diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/CHANGELOG.md b/sdk/mediaservices/azure-resourcemanager-mediaservices/CHANGELOG.md index f81ab5a8b13e..8c5a6da04258 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/CHANGELOG.md +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.1.0-beta.3 (Unreleased) +## 1.0.0-beta.1 (2021-10-18) +- Azure Resource Manager MediaServices client library for Java. This package contains Microsoft Azure SDK for MediaServices Management SDK. This Swagger was generated by the API Framework. Package tag package-2021-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## 1.1.0-beta.2 (2021-07-16) diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/README.md b/sdk/mediaservices/azure-resourcemanager-mediaservices/README.md index 254fd1343a46..4971917b5b97 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/README.md +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/README.md @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-mediaservices - 1.1.0-beta.2 + 1.1.0-beta.3 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/SAMPLE.md b/sdk/mediaservices/azure-resourcemanager-mediaservices/SAMPLE.md index fe21e814f923..0d52e77ea994 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/SAMPLE.md +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/SAMPLE.md @@ -1,132 +1,3201 @@ # Code snippets and samples -### AccountFilters +## AccountFilters -- [CreateOrUpdate](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AccountFiltersCreateOrUpdateSamples.java) -- [Delete](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AccountFiltersDeleteSamples.java) -- [Get](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AccountFiltersGetSamples.java) -- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AccountFiltersListSamples.java) -- [Update](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AccountFiltersUpdateSamples.java) +- [CreateOrUpdate](#accountfilters_createorupdate) +- [Delete](#accountfilters_delete) +- [Get](#accountfilters_get) +- [List](#accountfilters_list) +- [Update](#accountfilters_update) -### AssetFilters +## AssetFilters -- [CreateOrUpdate](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetFiltersCreateOrUpdateSamples.java) -- [Delete](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetFiltersDeleteSamples.java) -- [Get](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetFiltersGetSamples.java) -- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetFiltersListSamples.java) -- [Update](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetFiltersUpdateSamples.java) - -### Assets +- [CreateOrUpdate](#assetfilters_createorupdate) +- [Delete](#assetfilters_delete) +- [Get](#assetfilters_get) +- [List](#assetfilters_list) +- [Update](#assetfilters_update) -- [CreateOrUpdate](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsCreateOrUpdateSamples.java) -- [Delete](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsDeleteSamples.java) -- [Get](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsGetSamples.java) -- [GetEncryptionKey](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsGetEncryptionKeySamples.java) -- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsListSamples.java) -- [ListContainerSas](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsListContainerSasSamples.java) -- [ListStreamingLocators](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsListStreamingLocatorsSamples.java) -- [Update](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsUpdateSamples.java) +## Assets -### ContentKeyPolicies - -- [CreateOrUpdate](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/ContentKeyPoliciesCreateOrUpdateSamples.java) -- [Delete](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/ContentKeyPoliciesDeleteSamples.java) -- [Get](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/ContentKeyPoliciesGetSamples.java) -- [GetPolicyPropertiesWithSecrets](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/ContentKeyPoliciesGetPolicyPropertiesWithSecretsSamples.java) -- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/ContentKeyPoliciesListSamples.java) -- [Update](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/ContentKeyPoliciesUpdateSamples.java) - -### Jobs - -- [CancelJob](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/JobsCancelJobSamples.java) -- [Create](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/JobsCreateSamples.java) -- [Delete](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/JobsDeleteSamples.java) -- [Get](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/JobsGetSamples.java) -- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/JobsListSamples.java) -- [Update](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/JobsUpdateSamples.java) - -### LiveEvents - -- [Allocate](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsAllocateSamples.java) -- [Create](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsCreateSamples.java) -- [Delete](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsDeleteSamples.java) -- [Get](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsGetSamples.java) -- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsListSamples.java) -- [Reset](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsResetSamples.java) -- [Start](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsStartSamples.java) -- [Stop](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsStopSamples.java) -- [Update](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsUpdateSamples.java) - -### LiveOutputs - -- [Create](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveOutputsCreateSamples.java) -- [Delete](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveOutputsDeleteSamples.java) -- [Get](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveOutputsGetSamples.java) -- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveOutputsListSamples.java) - -### Locations - -- [CheckNameAvailability](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LocationsCheckNameAvailabilitySamples.java) - -### Mediaservices - -- [CreateOrUpdate](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesCreateOrUpdateSamples.java) -- [Delete](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesDeleteSamples.java) -- [GetByResourceGroup](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesGetByResourceGroupSamples.java) -- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesListSamples.java) -- [ListByResourceGroup](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesListByResourceGroupSamples.java) -- [ListEdgePolicies](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesListEdgePoliciesSamples.java) -- [SyncStorageKeys](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesSyncStorageKeysSamples.java) -- [Update](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesUpdateSamples.java) - -### Operations - -- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/OperationsListSamples.java) - -### PrivateEndpointConnections - -- [CreateOrUpdate](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/PrivateEndpointConnectionsCreateOrUpdateSamples.java) -- [Delete](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/PrivateEndpointConnectionsDeleteSamples.java) -- [Get](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/PrivateEndpointConnectionsGetSamples.java) -- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/PrivateEndpointConnectionsListSamples.java) - -### PrivateLinkResources - -- [Get](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/PrivateLinkResourcesGetSamples.java) -- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/PrivateLinkResourcesListSamples.java) - -### StreamingEndpoints - -- [Create](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsCreateSamples.java) -- [Delete](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsDeleteSamples.java) -- [Get](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsGetSamples.java) -- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsListSamples.java) -- [Scale](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsScaleSamples.java) -- [Start](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsStartSamples.java) -- [Stop](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsStopSamples.java) -- [Update](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsUpdateSamples.java) - -### StreamingLocators +- [CreateOrUpdate](#assets_createorupdate) +- [Delete](#assets_delete) +- [Get](#assets_get) +- [GetEncryptionKey](#assets_getencryptionkey) +- [List](#assets_list) +- [ListContainerSas](#assets_listcontainersas) +- [ListStreamingLocators](#assets_liststreaminglocators) +- [Update](#assets_update) -- [Create](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingLocatorsCreateSamples.java) -- [Delete](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingLocatorsDeleteSamples.java) -- [Get](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingLocatorsGetSamples.java) -- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingLocatorsListSamples.java) -- [ListContentKeys](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingLocatorsListContentKeysSamples.java) -- [ListPaths](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingLocatorsListPathsSamples.java) +## ContentKeyPolicies -### StreamingPolicies - -- [Create](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingPoliciesCreateSamples.java) -- [Delete](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingPoliciesDeleteSamples.java) -- [Get](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingPoliciesGetSamples.java) -- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingPoliciesListSamples.java) - -### Transforms +- [CreateOrUpdate](#contentkeypolicies_createorupdate) +- [Delete](#contentkeypolicies_delete) +- [Get](#contentkeypolicies_get) +- [GetPolicyPropertiesWithSecrets](#contentkeypolicies_getpolicypropertieswithsecrets) +- [List](#contentkeypolicies_list) +- [Update](#contentkeypolicies_update) + +## Jobs + +- [CancelJob](#jobs_canceljob) +- [Create](#jobs_create) +- [Delete](#jobs_delete) +- [Get](#jobs_get) +- [List](#jobs_list) +- [Update](#jobs_update) + +## LiveEvents + +- [Allocate](#liveevents_allocate) +- [Create](#liveevents_create) +- [Delete](#liveevents_delete) +- [Get](#liveevents_get) +- [List](#liveevents_list) +- [Reset](#liveevents_reset) +- [Start](#liveevents_start) +- [Stop](#liveevents_stop) +- [Update](#liveevents_update) + +## LiveOutputs + +- [Create](#liveoutputs_create) +- [Delete](#liveoutputs_delete) +- [Get](#liveoutputs_get) +- [List](#liveoutputs_list) + +## Locations + +- [CheckNameAvailability](#locations_checknameavailability) + +## Mediaservices + +- [CreateOrUpdate](#mediaservices_createorupdate) +- [Delete](#mediaservices_delete) +- [GetByResourceGroup](#mediaservices_getbyresourcegroup) +- [List](#mediaservices_list) +- [ListByResourceGroup](#mediaservices_listbyresourcegroup) +- [ListEdgePolicies](#mediaservices_listedgepolicies) +- [SyncStorageKeys](#mediaservices_syncstoragekeys) +- [Update](#mediaservices_update) + +## Operations + +- [List](#operations_list) + +## PrivateEndpointConnections + +- [CreateOrUpdate](#privateendpointconnections_createorupdate) +- [Delete](#privateendpointconnections_delete) +- [Get](#privateendpointconnections_get) +- [List](#privateendpointconnections_list) + +## PrivateLinkResources + +- [Get](#privatelinkresources_get) +- [List](#privatelinkresources_list) + +## StreamingEndpoints + +- [Create](#streamingendpoints_create) +- [Delete](#streamingendpoints_delete) +- [Get](#streamingendpoints_get) +- [List](#streamingendpoints_list) +- [Scale](#streamingendpoints_scale) +- [Start](#streamingendpoints_start) +- [Stop](#streamingendpoints_stop) +- [Update](#streamingendpoints_update) + +## StreamingLocators + +- [Create](#streaminglocators_create) +- [Delete](#streaminglocators_delete) +- [Get](#streaminglocators_get) +- [List](#streaminglocators_list) +- [ListContentKeys](#streaminglocators_listcontentkeys) +- [ListPaths](#streaminglocators_listpaths) + +## StreamingPolicies + +- [Create](#streamingpolicies_create) +- [Delete](#streamingpolicies_delete) +- [Get](#streamingpolicies_get) +- [List](#streamingpolicies_list) + +## Transforms + +- [CreateOrUpdate](#transforms_createorupdate) +- [Delete](#transforms_delete) +- [Get](#transforms_get) +- [List](#transforms_list) +- [Update](#transforms_update) +### AccountFilters_CreateOrUpdate + +```java +import com.azure.resourcemanager.mediaservices.models.FilterTrackPropertyCompareOperation; +import com.azure.resourcemanager.mediaservices.models.FilterTrackPropertyCondition; +import com.azure.resourcemanager.mediaservices.models.FilterTrackPropertyType; +import com.azure.resourcemanager.mediaservices.models.FilterTrackSelection; +import com.azure.resourcemanager.mediaservices.models.FirstQuality; +import com.azure.resourcemanager.mediaservices.models.PresentationTimeRange; +import java.util.Arrays; + +/** Samples for AccountFilters CreateOrUpdate. */ +public final class AccountFiltersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accountFilters-create.json + */ + /** + * Sample code: Create an Account Filter. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void createAnAccountFilter(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .accountFilters() + .define("newAccountFilter") + .withExistingMediaService("contoso", "contosomedia") + .withPresentationTimeRange( + new PresentationTimeRange() + .withStartTimestamp(0L) + .withEndTimestamp(170000000L) + .withPresentationWindowDuration(9223372036854775000L) + .withLiveBackoffDuration(0L) + .withTimescale(10000000L) + .withForceEndTimestamp(false)) + .withFirstQuality(new FirstQuality().withBitrate(128000)) + .withTracks( + Arrays + .asList( + new FilterTrackSelection() + .withTrackSelections( + Arrays + .asList( + new FilterTrackPropertyCondition() + .withProperty(FilterTrackPropertyType.TYPE) + .withValue("Audio") + .withOperation(FilterTrackPropertyCompareOperation.EQUAL), + new FilterTrackPropertyCondition() + .withProperty(FilterTrackPropertyType.LANGUAGE) + .withValue("en") + .withOperation(FilterTrackPropertyCompareOperation.NOT_EQUAL), + new FilterTrackPropertyCondition() + .withProperty(FilterTrackPropertyType.FOUR_CC) + .withValue("EC-3") + .withOperation(FilterTrackPropertyCompareOperation.NOT_EQUAL))), + new FilterTrackSelection() + .withTrackSelections( + Arrays + .asList( + new FilterTrackPropertyCondition() + .withProperty(FilterTrackPropertyType.TYPE) + .withValue("Video") + .withOperation(FilterTrackPropertyCompareOperation.EQUAL), + new FilterTrackPropertyCondition() + .withProperty(FilterTrackPropertyType.BITRATE) + .withValue("3000000-5000000") + .withOperation(FilterTrackPropertyCompareOperation.EQUAL))))) + .create(); + } +} +``` + +### AccountFilters_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for AccountFilters Delete. */ +public final class AccountFiltersDeleteSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accountFilters-delete.json + */ + /** + * Sample code: Delete an Account Filter. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void deleteAnAccountFilter(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .accountFilters() + .deleteWithResponse("contoso", "contosomedia", "accountFilterWithTimeWindowAndTrack", Context.NONE); + } +} +``` + +### AccountFilters_Get + +```java +import com.azure.core.util.Context; + +/** Samples for AccountFilters Get. */ +public final class AccountFiltersGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accountFilters-get-by-name.json + */ + /** + * Sample code: Get an Account Filter by name. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getAnAccountFilterByName(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.accountFilters().getWithResponse("contoso", "contosomedia", "accountFilterWithTrack", Context.NONE); + } +} +``` + +### AccountFilters_List + +```java +import com.azure.core.util.Context; + +/** Samples for AccountFilters List. */ +public final class AccountFiltersListSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accountFilters-list-all.json + */ + /** + * Sample code: List all Account Filters. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listAllAccountFilters(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.accountFilters().list("contoso", "contosomedia", Context.NONE); + } +} +``` + +### AccountFilters_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.mediaservices.models.AccountFilter; +import com.azure.resourcemanager.mediaservices.models.FirstQuality; +import com.azure.resourcemanager.mediaservices.models.PresentationTimeRange; + +/** Samples for AccountFilters Update. */ +public final class AccountFiltersUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accountFilters-update.json + */ + /** + * Sample code: Update an Account Filter. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void updateAnAccountFilter(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + AccountFilter resource = + manager + .accountFilters() + .getWithResponse("contoso", "contosomedia", "accountFilterWithTimeWindowAndTrack", Context.NONE) + .getValue(); + resource + .update() + .withPresentationTimeRange( + new PresentationTimeRange() + .withStartTimestamp(10L) + .withEndTimestamp(170000000L) + .withPresentationWindowDuration(9223372036854775000L) + .withLiveBackoffDuration(0L) + .withTimescale(10000000L) + .withForceEndTimestamp(false)) + .withFirstQuality(new FirstQuality().withBitrate(128000)) + .apply(); + } +} +``` + +### AssetFilters_CreateOrUpdate + +```java +import com.azure.resourcemanager.mediaservices.models.FilterTrackPropertyCompareOperation; +import com.azure.resourcemanager.mediaservices.models.FilterTrackPropertyCondition; +import com.azure.resourcemanager.mediaservices.models.FilterTrackPropertyType; +import com.azure.resourcemanager.mediaservices.models.FilterTrackSelection; +import com.azure.resourcemanager.mediaservices.models.FirstQuality; +import com.azure.resourcemanager.mediaservices.models.PresentationTimeRange; +import java.util.Arrays; + +/** Samples for AssetFilters CreateOrUpdate. */ +public final class AssetFiltersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/assetFilters-create.json + */ + /** + * Sample code: Create an Asset Filter. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void createAnAssetFilter(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .assetFilters() + .define("newAssetFilter") + .withExistingAsset("contoso", "contosomedia", "ClimbingMountRainer") + .withPresentationTimeRange( + new PresentationTimeRange() + .withStartTimestamp(0L) + .withEndTimestamp(170000000L) + .withPresentationWindowDuration(9223372036854775000L) + .withLiveBackoffDuration(0L) + .withTimescale(10000000L) + .withForceEndTimestamp(false)) + .withFirstQuality(new FirstQuality().withBitrate(128000)) + .withTracks( + Arrays + .asList( + new FilterTrackSelection() + .withTrackSelections( + Arrays + .asList( + new FilterTrackPropertyCondition() + .withProperty(FilterTrackPropertyType.TYPE) + .withValue("Audio") + .withOperation(FilterTrackPropertyCompareOperation.EQUAL), + new FilterTrackPropertyCondition() + .withProperty(FilterTrackPropertyType.LANGUAGE) + .withValue("en") + .withOperation(FilterTrackPropertyCompareOperation.NOT_EQUAL), + new FilterTrackPropertyCondition() + .withProperty(FilterTrackPropertyType.FOUR_CC) + .withValue("EC-3") + .withOperation(FilterTrackPropertyCompareOperation.NOT_EQUAL))), + new FilterTrackSelection() + .withTrackSelections( + Arrays + .asList( + new FilterTrackPropertyCondition() + .withProperty(FilterTrackPropertyType.TYPE) + .withValue("Video") + .withOperation(FilterTrackPropertyCompareOperation.EQUAL), + new FilterTrackPropertyCondition() + .withProperty(FilterTrackPropertyType.BITRATE) + .withValue("3000000-5000000") + .withOperation(FilterTrackPropertyCompareOperation.EQUAL))))) + .create(); + } +} +``` + +### AssetFilters_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for AssetFilters Delete. */ +public final class AssetFiltersDeleteSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/assetFilters-delete.json + */ + /** + * Sample code: Delete an Asset Filter. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void deleteAnAssetFilter(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .assetFilters() + .deleteWithResponse( + "contoso", "contosomedia", "ClimbingMountRainer", "assetFilterWithTimeWindowAndTrack", Context.NONE); + } +} +``` + +### AssetFilters_Get + +```java +import com.azure.core.util.Context; + +/** Samples for AssetFilters Get. */ +public final class AssetFiltersGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/assetFilters-get-by-name.json + */ + /** + * Sample code: Get an Asset Filter by name. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getAnAssetFilterByName(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .assetFilters() + .getWithResponse( + "contoso", "contosomedia", "ClimbingMountRainer", "assetFilterWithTimeWindowAndTrack", Context.NONE); + } +} +``` + +### AssetFilters_List + +```java +import com.azure.core.util.Context; + +/** Samples for AssetFilters List. */ +public final class AssetFiltersListSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/assetFilters-list-all.json + */ + /** + * Sample code: List all Asset Filters. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listAllAssetFilters(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.assetFilters().list("contoso", "contosomedia", "ClimbingMountRainer", Context.NONE); + } +} +``` + +### AssetFilters_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.mediaservices.models.AssetFilter; +import com.azure.resourcemanager.mediaservices.models.FirstQuality; +import com.azure.resourcemanager.mediaservices.models.PresentationTimeRange; + +/** Samples for AssetFilters Update. */ +public final class AssetFiltersUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/assetFilters-update.json + */ + /** + * Sample code: Update an Asset Filter. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void updateAnAssetFilter(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + AssetFilter resource = + manager + .assetFilters() + .getWithResponse( + "contoso", "contosomedia", "ClimbingMountRainer", "assetFilterWithTimeWindowAndTrack", Context.NONE) + .getValue(); + resource + .update() + .withPresentationTimeRange( + new PresentationTimeRange() + .withStartTimestamp(10L) + .withEndTimestamp(170000000L) + .withPresentationWindowDuration(9223372036854775000L) + .withLiveBackoffDuration(0L) + .withTimescale(10000000L) + .withForceEndTimestamp(false)) + .withFirstQuality(new FirstQuality().withBitrate(128000)) + .apply(); + } +} +``` + +### Assets_CreateOrUpdate + +```java +/** Samples for Assets CreateOrUpdate. */ +public final class AssetsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/assets-create.json + */ + /** + * Sample code: Create an Asset. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void createAnAsset(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .assets() + .define("ClimbingMountLogan") + .withExistingMediaService("contoso", "contosomedia") + .withDescription("A documentary showing the ascent of Mount Logan") + .withStorageAccountName("storage0") + .create(); + } +} +``` + +### Assets_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Assets Delete. */ +public final class AssetsDeleteSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/assets-delete.json + */ + /** + * Sample code: Delete an Asset. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void deleteAnAsset(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.assets().deleteWithResponse("contoso", "contosomedia", "ClimbingMountAdams", Context.NONE); + } +} +``` + +### Assets_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Assets Get. */ +public final class AssetsGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/assets-get-by-name.json + */ + /** + * Sample code: Get an Asset by name. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getAnAssetByName(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.assets().getWithResponse("contoso", "contosomedia", "ClimbingMountAdams", Context.NONE); + } +} +``` + +### Assets_GetEncryptionKey + +```java +import com.azure.core.util.Context; + +/** Samples for Assets GetEncryptionKey. */ +public final class AssetsGetEncryptionKeySamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/assets-get-encryption-keys.json + */ + /** + * Sample code: Get Asset Storage Encryption Keys. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getAssetStorageEncryptionKeys( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .assets() + .getEncryptionKeyWithResponse("contoso", "contosomedia", "ClimbingMountSaintHelens", Context.NONE); + } +} +``` + +### Assets_List + +```java +import com.azure.core.util.Context; + +/** Samples for Assets List. */ +public final class AssetsListSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/assets-list-by-date.json + */ + /** + * Sample code: List Asset ordered by date. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listAssetOrderedByDate(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.assets().list("contoso", "contosomedia", null, null, "properties/created", Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/assets-list-in-date-range.json + */ + /** + * Sample code: List Asset created in a date range. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listAssetCreatedInADateRange( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .assets() + .list( + "contoso", + "contosomedia", + "properties/created gt 2012-06-01 and properties/created lt 2013-07-01", + null, + "properties/created", + Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/assets-list-all.json + */ + /** + * Sample code: List all Assets. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listAllAssets(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.assets().list("contoso", "contosomedia", null, null, null, Context.NONE); + } +} +``` + +### Assets_ListContainerSas + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.mediaservices.models.AssetContainerPermission; +import com.azure.resourcemanager.mediaservices.models.ListContainerSasInput; +import java.time.OffsetDateTime; + +/** Samples for Assets ListContainerSas. */ +public final class AssetsListContainerSasSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/assets-list-sas-urls.json + */ + /** + * Sample code: List Asset SAS URLs. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listAssetSASURLs(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .assets() + .listContainerSasWithResponse( + "contoso", + "contosomedia", + "ClimbingMountBaker", + new ListContainerSasInput() + .withPermissions(AssetContainerPermission.READ_WRITE) + .withExpiryTime(OffsetDateTime.parse("2018-01-01T10:00:00.007Z")), + Context.NONE); + } +} +``` + +### Assets_ListStreamingLocators + +```java +import com.azure.core.util.Context; + +/** Samples for Assets ListStreamingLocators. */ +public final class AssetsListStreamingLocatorsSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/assets-list-streaming-locators.json + */ + /** + * Sample code: List Asset SAS URLs. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listAssetSASURLs(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .assets() + .listStreamingLocatorsWithResponse("contoso", "contosomedia", "ClimbingMountSaintHelens", Context.NONE); + } +} +``` + +### Assets_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.mediaservices.models.Asset; + +/** Samples for Assets Update. */ +public final class AssetsUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/assets-update.json + */ + /** + * Sample code: Update an Asset. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void updateAnAsset(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + Asset resource = + manager.assets().getWithResponse("contoso", "contosomedia", "ClimbingMountBaker", Context.NONE).getValue(); + resource.update().withDescription("A documentary showing the ascent of Mount Baker in HD").apply(); + } +} +``` + +### ContentKeyPolicies_CreateOrUpdate + +```java +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyClearKeyConfiguration; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyOpenRestriction; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyOption; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyPlayReadyConfiguration; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyPlayReadyContentType; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyPlayReadyLicense; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyPlayReadyLicenseType; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyPlayReadyPlayRight; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyPlayReadyUnknownOutputPassingOption; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyRestrictionTokenType; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyRsaTokenKey; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicySymmetricTokenKey; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyTokenRestriction; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyWidevineConfiguration; +import java.time.OffsetDateTime; +import java.util.Arrays; + +/** Samples for ContentKeyPolicies CreateOrUpdate. */ +public final class ContentKeyPoliciesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/content-key-policies-create-multiple-options.json + */ + /** + * Sample code: Creates a Content Key Policy with multiple options. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void createsAContentKeyPolicyWithMultipleOptions( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .contentKeyPolicies() + .define("PolicyCreatedWithMultipleOptions") + .withExistingMediaService("contoso", "contosomedia") + .withDescription("ArmPolicyDescription") + .withOptions( + Arrays + .asList( + new ContentKeyPolicyOption() + .withName("ClearKeyOption") + .withConfiguration(new ContentKeyPolicyClearKeyConfiguration()) + .withRestriction( + new ContentKeyPolicyTokenRestriction() + .withIssuer("urn:issuer") + .withAudience("urn:audience") + .withPrimaryVerificationKey( + new ContentKeyPolicySymmetricTokenKey() + .withKeyValue("AAAAAAAAAAAAAAAAAAAAAA==".getBytes())) + .withRestrictionTokenType(ContentKeyPolicyRestrictionTokenType.SWT)), + new ContentKeyPolicyOption() + .withName("widevineoption") + .withConfiguration( + new ContentKeyPolicyWidevineConfiguration() + .withWidevineTemplate( + "{\"allowed_track_types\":\"SD_HD\",\"content_key_specs\":[{\"track_type\":\"SD\",\"security_level\":1,\"required_output_protection\":{\"hdcp\":\"HDCP_V2\"}}],\"policy_overrides\":{\"can_play\":true,\"can_persist\":true,\"can_renew\":false}}")) + .withRestriction(new ContentKeyPolicyOpenRestriction()))) + .create(); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/content-key-policies-create-nodrm-token.json + */ + /** + * Sample code: Creates a Content Key Policy with ClearKey option and Token Restriction. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void createsAContentKeyPolicyWithClearKeyOptionAndTokenRestriction( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .contentKeyPolicies() + .define("PolicyWithClearKeyOptionAndSwtTokenRestriction") + .withExistingMediaService("contoso", "contosomedia") + .withDescription("ArmPolicyDescription") + .withOptions( + Arrays + .asList( + new ContentKeyPolicyOption() + .withName("ClearKeyOption") + .withConfiguration(new ContentKeyPolicyClearKeyConfiguration()) + .withRestriction( + new ContentKeyPolicyTokenRestriction() + .withIssuer("urn:issuer") + .withAudience("urn:audience") + .withPrimaryVerificationKey( + new ContentKeyPolicySymmetricTokenKey() + .withKeyValue("AAAAAAAAAAAAAAAAAAAAAA==".getBytes())) + .withRestrictionTokenType(ContentKeyPolicyRestrictionTokenType.SWT)))) + .create(); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/content-key-policies-create-playready-open.json + */ + /** + * Sample code: Creates a Content Key Policy with PlayReady option and Open Restriction. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void createsAContentKeyPolicyWithPlayReadyOptionAndOpenRestriction( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .contentKeyPolicies() + .define("PolicyWithPlayReadyOptionAndOpenRestriction") + .withExistingMediaService("contoso", "contosomedia") + .withDescription("ArmPolicyDescription") + .withOptions( + Arrays + .asList( + new ContentKeyPolicyOption() + .withName("ArmPolicyOptionName") + .withConfiguration( + new ContentKeyPolicyPlayReadyConfiguration() + .withLicenses( + Arrays + .asList( + new ContentKeyPolicyPlayReadyLicense() + .withAllowTestDevices(true) + .withBeginDate(OffsetDateTime.parse("2017-10-16T18:22:53.46Z")) + .withPlayRight( + new ContentKeyPolicyPlayReadyPlayRight() + .withScmsRestriction(2) + .withDigitalVideoOnlyContentRestriction(false) + .withImageConstraintForAnalogComponentVideoRestriction(true) + .withImageConstraintForAnalogComputerMonitorRestriction( + false) + .withAllowPassingVideoContentToUnknownOutput( + ContentKeyPolicyPlayReadyUnknownOutputPassingOption + .NOT_ALLOWED)) + .withLicenseType(ContentKeyPolicyPlayReadyLicenseType.PERSISTENT) + .withContentKeyLocation( + new ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader()) + .withContentType( + ContentKeyPolicyPlayReadyContentType.ULTRA_VIOLET_DOWNLOAD)))) + .withRestriction(new ContentKeyPolicyOpenRestriction()))) + .create(); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/content-key-policies-create-widevine-token.json + */ + /** + * Sample code: Creates a Content Key Policy with Widevine option and Token Restriction. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void createsAContentKeyPolicyWithWidevineOptionAndTokenRestriction( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .contentKeyPolicies() + .define("PolicyWithWidevineOptionAndJwtTokenRestriction") + .withExistingMediaService("contoso", "contosomedia") + .withDescription("ArmPolicyDescription") + .withOptions( + Arrays + .asList( + new ContentKeyPolicyOption() + .withName("widevineoption") + .withConfiguration( + new ContentKeyPolicyWidevineConfiguration() + .withWidevineTemplate( + "{\"allowed_track_types\":\"SD_HD\",\"content_key_specs\":[{\"track_type\":\"SD\",\"security_level\":1,\"required_output_protection\":{\"hdcp\":\"HDCP_V2\"}}],\"policy_overrides\":{\"can_play\":true,\"can_persist\":true,\"can_renew\":false}}")) + .withRestriction( + new ContentKeyPolicyTokenRestriction() + .withIssuer("urn:issuer") + .withAudience("urn:audience") + .withPrimaryVerificationKey( + new ContentKeyPolicyRsaTokenKey() + .withExponent("AQAB".getBytes()) + .withModulus("AQAD".getBytes())) + .withAlternateVerificationKeys( + Arrays + .asList( + new ContentKeyPolicySymmetricTokenKey() + .withKeyValue("AAAAAAAAAAAAAAAAAAAAAA==".getBytes()))) + .withRestrictionTokenType(ContentKeyPolicyRestrictionTokenType.JWT)))) + .create(); + } +} +``` + +### ContentKeyPolicies_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for ContentKeyPolicies Delete. */ +public final class ContentKeyPoliciesDeleteSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/content-key-policies-delete.json + */ + /** + * Sample code: Delete a Key Policy. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void deleteAKeyPolicy(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .contentKeyPolicies() + .deleteWithResponse("contoso", "contosomedia", "PolicyWithPlayReadyOptionAndOpenRestriction", Context.NONE); + } +} +``` + +### ContentKeyPolicies_Get + +```java +import com.azure.core.util.Context; + +/** Samples for ContentKeyPolicies Get. */ +public final class ContentKeyPoliciesGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/content-key-policies-get-by-name.json + */ + /** + * Sample code: Get a Content Key Policy by name. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getAContentKeyPolicyByName( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .contentKeyPolicies() + .getWithResponse("contoso", "contosomedia", "PolicyWithMultipleOptions", Context.NONE); + } +} +``` + +### ContentKeyPolicies_GetPolicyPropertiesWithSecrets + +```java +import com.azure.core.util.Context; + +/** Samples for ContentKeyPolicies GetPolicyPropertiesWithSecrets. */ +public final class ContentKeyPoliciesGetPolicyPropertiesWithSecretsSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/content-key-policies-get-with-secrets.json + */ + /** + * Sample code: Get an Content Key Policy with secrets. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getAnContentKeyPolicyWithSecrets( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .contentKeyPolicies() + .getPolicyPropertiesWithSecretsWithResponse( + "contoso", "contosomedia", "PolicyWithMultipleOptions", Context.NONE); + } +} +``` + +### ContentKeyPolicies_List + +```java +import com.azure.core.util.Context; + +/** Samples for ContentKeyPolicies List. */ +public final class ContentKeyPoliciesListSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/content-key-policies-list-all.json + */ + /** + * Sample code: Lists all Content Key Policies. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listsAllContentKeyPolicies( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.contentKeyPolicies().list("contoso", "contosomedia", null, null, null, Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/content-key-policies-list-in-date-range.json + */ + /** + * Sample code: Lists Content Key Policies with created and last modified filters. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listsContentKeyPoliciesWithCreatedAndLastModifiedFilters( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .contentKeyPolicies() + .list( + "contoso", + "contosomedia", + "properties/lastModified gt 2016-06-01 and properties/created lt 2013-07-01", + null, + null, + Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/content-key-policies-list-by-lastModified.json + */ + /** + * Sample code: Lists Content Key Policies ordered by last modified. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listsContentKeyPoliciesOrderedByLastModified( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .contentKeyPolicies() + .list("contoso", "contosomedia", null, null, "properties/lastModified", Context.NONE); + } +} +``` + +### ContentKeyPolicies_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicy; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyClearKeyConfiguration; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyOpenRestriction; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyOption; +import java.util.Arrays; + +/** Samples for ContentKeyPolicies Update. */ +public final class ContentKeyPoliciesUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/content-key-policies-update.json + */ + /** + * Sample code: Update a Content Key Policy. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void updateAContentKeyPolicy(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + ContentKeyPolicy resource = + manager + .contentKeyPolicies() + .getWithResponse("contoso", "contosomedia", "PolicyWithClearKeyOptionAndTokenRestriction", Context.NONE) + .getValue(); + resource + .update() + .withDescription("Updated Policy") + .withOptions( + Arrays + .asList( + new ContentKeyPolicyOption() + .withName("ClearKeyOption") + .withConfiguration(new ContentKeyPolicyClearKeyConfiguration()) + .withRestriction(new ContentKeyPolicyOpenRestriction()))) + .apply(); + } +} +``` + +### Jobs_CancelJob + +```java +import com.azure.core.util.Context; + +/** Samples for Jobs CancelJob. */ +public final class JobsCancelJobSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/jobs-cancel.json + */ + /** + * Sample code: Cancel a Job. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void cancelAJob(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .jobs() + .cancelJobWithResponse("contosoresources", "contosomedia", "exampleTransform", "job1", Context.NONE); + } +} +``` + +### Jobs_Create + +```java +import com.azure.resourcemanager.mediaservices.models.JobInput; +import com.azure.resourcemanager.mediaservices.models.JobOutputAsset; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Jobs Create. */ +public final class JobsCreateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/jobs-create.json + */ + /** + * Sample code: Create a Job. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void createAJob(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .jobs() + .define("job1") + .withExistingTransform("contosoresources", "contosomedia", "exampleTransform") + .withInput(new JobInput()) + .withOutputs(Arrays.asList(new JobOutputAsset().withAssetName("job1-OutputAsset"))) + .withCorrelationData(mapOf("Key 2", "Value 2", "key1", "value1")) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Jobs_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Jobs Delete. */ +public final class JobsDeleteSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/jobs-delete.json + */ + /** + * Sample code: Delete a Job. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void deleteAJob(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .jobs() + .deleteWithResponse("contosoresources", "contosomedia", "exampleTransform", "jobToDelete", Context.NONE); + } +} +``` + +### Jobs_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Jobs Get. */ +public final class JobsGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/jobs-get-by-name.json + */ + /** + * Sample code: Get a Job by name. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getAJobByName(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.jobs().getWithResponse("contosoresources", "contosomedia", "exampleTransform", "job1", Context.NONE); + } +} +``` + +### Jobs_List + +```java +import com.azure.core.util.Context; + +/** Samples for Jobs List. */ +public final class JobsListSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/jobs-list-all-filter-by-state-ne.json + */ + /** + * Sample code: Lists Jobs for the Transform filter by state not equal. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listsJobsForTheTransformFilterByStateNotEqual( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .jobs() + .list( + "contosoresources", + "contosomedia", + "exampleTransform", + "properties/state ne Microsoft.Media.JobState'processing'", + null, + Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/jobs-list-all-filter-by-state-eq.json + */ + /** + * Sample code: Lists Jobs for the Transform filter by state equal. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listsJobsForTheTransformFilterByStateEqual( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .jobs() + .list( + "contosoresources", + "contosomedia", + "exampleTransform", + "properties/state eq Microsoft.Media.JobState'Processing'", + null, + Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/jobs-list-all-filter-by-name.json + */ + /** + * Sample code: Lists Jobs for the Transform filter by name. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listsJobsForTheTransformFilterByName( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .jobs() + .list( + "contosoresources", + "contosomedia", + "exampleTransform", + "name eq 'job1' or name eq 'job2'", + "name", + Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/jobs-list-all-filter-by-lastmodified.json + */ + /** + * Sample code: Lists Jobs for the Transform filter by lastmodified. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listsJobsForTheTransformFilterByLastmodified( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .jobs() + .list( + "contosoresources", + "contosomedia", + "exampleTransform", + "properties/lastmodified ge 2021-06-01T00:00:10.0000000Z and properties/lastmodified le" + + " 2021-06-01T00:00:20.0000000Z", + "properties/lastmodified desc", + Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/jobs-list-all-filter-by-created.json + */ + /** + * Sample code: Lists Jobs for the Transform filter by created. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listsJobsForTheTransformFilterByCreated( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .jobs() + .list( + "contosoresources", + "contosomedia", + "exampleTransform", + "properties/created ge 2021-06-01T00:00:10.0000000Z and properties/created le" + + " 2021-06-01T00:00:20.0000000Z", + "properties/created", + Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/jobs-list-all.json + */ + /** + * Sample code: Lists all of the Jobs for the Transform. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listsAllOfTheJobsForTheTransform( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.jobs().list("contosoresources", "contosomedia", "exampleTransform", null, null, Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/jobs-list-all-filter-by-name-and-state.json + */ + /** + * Sample code: Lists Jobs for the Transform filter by name and state. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listsJobsForTheTransformFilterByNameAndState( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .jobs() + .list( + "contosoresources", + "contosomedia", + "exampleTransform", + "name eq 'job3' and properties/state eq Microsoft.Media.JobState'finished'", + null, + Context.NONE); + } +} +``` + +### Jobs_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.mediaservices.models.Job; +import com.azure.resourcemanager.mediaservices.models.JobInput; +import com.azure.resourcemanager.mediaservices.models.JobOutputAsset; +import com.azure.resourcemanager.mediaservices.models.Priority; +import java.util.Arrays; + +/** Samples for Jobs Update. */ +public final class JobsUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/jobs-update.json + */ + /** + * Sample code: Update a Job. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void updateAJob(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + Job resource = + manager + .jobs() + .getWithResponse("contosoresources", "contosomedia", "exampleTransform", "job1", Context.NONE) + .getValue(); + resource + .update() + .withDescription("Example job to illustrate update.") + .withInput(new JobInput()) + .withOutputs(Arrays.asList(new JobOutputAsset().withAssetName("job1-OutputAsset"))) + .withPriority(Priority.HIGH) + .apply(); + } +} +``` + +### LiveEvents_Allocate + +```java +import com.azure.core.util.Context; + +/** Samples for LiveEvents Allocate. */ +public final class LiveEventsAllocateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/liveevent-allocate.json + */ + /** + * Sample code: Allocate a LiveEvent. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void allocateALiveEvent(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.liveEvents().allocate("mediaresources", "slitestmedia10", "myLiveEvent1", Context.NONE); + } +} +``` + +### LiveEvents_Create + +```java +import com.azure.resourcemanager.mediaservices.models.IpAccessControl; +import com.azure.resourcemanager.mediaservices.models.IpRange; +import com.azure.resourcemanager.mediaservices.models.LiveEventInput; +import com.azure.resourcemanager.mediaservices.models.LiveEventInputAccessControl; +import com.azure.resourcemanager.mediaservices.models.LiveEventInputProtocol; +import com.azure.resourcemanager.mediaservices.models.LiveEventPreview; +import com.azure.resourcemanager.mediaservices.models.LiveEventPreviewAccessControl; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for LiveEvents Create. */ +public final class LiveEventsCreateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/liveevent-create.json + */ + /** + * Sample code: Create a LiveEvent. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void createALiveEvent(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .liveEvents() + .define("myLiveEvent1") + .withRegion("West US") + .withExistingMediaservice("mediaresources", "slitestmedia10") + .withTags(mapOf("tag1", "value1", "tag2", "value2")) + .withDescription("test event 1") + .withInput( + new LiveEventInput() + .withStreamingProtocol(LiveEventInputProtocol.RTMP) + .withAccessControl( + new LiveEventInputAccessControl() + .withIp( + new IpAccessControl() + .withAllow( + Arrays + .asList( + new IpRange() + .withName("AllowAll") + .withAddress("0.0.0.0") + .withSubnetPrefixLength(0))))) + .withKeyFrameIntervalDuration("PT6S")) + .withPreview( + new LiveEventPreview() + .withAccessControl( + new LiveEventPreviewAccessControl() + .withIp( + new IpAccessControl() + .withAllow( + Arrays + .asList( + new IpRange() + .withName("AllowAll") + .withAddress("0.0.0.0") + .withSubnetPrefixLength(0)))))) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### LiveEvents_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for LiveEvents Delete. */ +public final class LiveEventsDeleteSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/liveevent-delete.json + */ + /** + * Sample code: Delete a LiveEvent. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void deleteALiveEvent(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.liveEvents().delete("mediaresources", "slitestmedia10", "myLiveEvent1", Context.NONE); + } +} +``` + +### LiveEvents_Get + +```java +import com.azure.core.util.Context; + +/** Samples for LiveEvents Get. */ +public final class LiveEventsGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/liveevent-list-by-name.json + */ + /** + * Sample code: Get a LiveEvent by name. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getALiveEventByName(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.liveEvents().getWithResponse("mediaresources", "slitestmedia10", "myLiveEvent1", Context.NONE); + } +} +``` + +### LiveEvents_List + +```java +import com.azure.core.util.Context; + +/** Samples for LiveEvents List. */ +public final class LiveEventsListSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/liveevent-list-all.json + */ + /** + * Sample code: List all LiveEvents. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listAllLiveEvents(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.liveEvents().list("mediaresources", "slitestmedia10", Context.NONE); + } +} +``` + +### LiveEvents_Reset + +```java +import com.azure.core.util.Context; + +/** Samples for LiveEvents Reset. */ +public final class LiveEventsResetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/liveevent-reset.json + */ + /** + * Sample code: Reset a LiveEvent. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void resetALiveEvent(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.liveEvents().reset("mediaresources", "slitestmedia10", "myLiveEvent1", Context.NONE); + } +} +``` + +### LiveEvents_Start + +```java +import com.azure.core.util.Context; + +/** Samples for LiveEvents Start. */ +public final class LiveEventsStartSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/liveevent-start.json + */ + /** + * Sample code: Start a LiveEvent. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void startALiveEvent(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.liveEvents().start("mediaresources", "slitestmedia10", "myLiveEvent1", Context.NONE); + } +} +``` + +### LiveEvents_Stop + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.mediaservices.models.LiveEventActionInput; + +/** Samples for LiveEvents Stop. */ +public final class LiveEventsStopSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/liveevent-stop.json + */ + /** + * Sample code: Stop a LiveEvent. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void stopALiveEvent(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .liveEvents() + .stop( + "mediaresources", + "slitestmedia10", + "myLiveEvent1", + new LiveEventActionInput().withRemoveOutputsOnStop(false), + Context.NONE); + } +} +``` + +### LiveEvents_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.mediaservices.models.IpAccessControl; +import com.azure.resourcemanager.mediaservices.models.IpRange; +import com.azure.resourcemanager.mediaservices.models.LiveEvent; +import com.azure.resourcemanager.mediaservices.models.LiveEventInput; +import com.azure.resourcemanager.mediaservices.models.LiveEventInputAccessControl; +import com.azure.resourcemanager.mediaservices.models.LiveEventInputProtocol; +import com.azure.resourcemanager.mediaservices.models.LiveEventPreview; +import com.azure.resourcemanager.mediaservices.models.LiveEventPreviewAccessControl; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for LiveEvents Update. */ +public final class LiveEventsUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/liveevent-update.json + */ + /** + * Sample code: Update a LiveEvent. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void updateALiveEvent(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + LiveEvent resource = + manager + .liveEvents() + .getWithResponse("mediaresources", "slitestmedia10", "myLiveEvent1", Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("tag1", "value1", "tag2", "value2", "tag3", "value3")) + .withDescription("test event updated") + .withInput( + new LiveEventInput() + .withStreamingProtocol(LiveEventInputProtocol.FRAGMENTED_MP4) + .withAccessControl( + new LiveEventInputAccessControl() + .withIp( + new IpAccessControl() + .withAllow( + Arrays.asList(new IpRange().withName("AllowOne").withAddress("192.1.1.0"))))) + .withKeyFrameIntervalDuration("PT6S")) + .withPreview( + new LiveEventPreview() + .withAccessControl( + new LiveEventPreviewAccessControl() + .withIp( + new IpAccessControl() + .withAllow( + Arrays.asList(new IpRange().withName("AllowOne").withAddress("192.1.1.0")))))) + .apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### LiveOutputs_Create + +```java +import com.azure.resourcemanager.mediaservices.models.Hls; +import java.time.Duration; + +/** Samples for LiveOutputs Create. */ +public final class LiveOutputsCreateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/liveoutput-create.json + */ + /** + * Sample code: Create a LiveOutput. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void createALiveOutput(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .liveOutputs() + .define("myLiveOutput1") + .withExistingLiveEvent("mediaresources", "slitestmedia10", "myLiveEvent1") + .withDescription("test live output 1") + .withAssetName("6f3264f5-a189-48b4-a29a-a40f22575212") + .withArchiveWindowLength(Duration.parse("PT5M")) + .withManifestName("testmanifest") + .withHls(new Hls().withFragmentsPerTsSegment(5)) + .create(); + } +} +``` + +### LiveOutputs_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for LiveOutputs Delete. */ +public final class LiveOutputsDeleteSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/liveoutput-delete.json + */ + /** + * Sample code: Delete a LiveOutput. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void deleteALiveOutput(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.liveOutputs().delete("mediaresources", "slitestmedia10", "myLiveEvent1", "myLiveOutput1", Context.NONE); + } +} +``` + +### LiveOutputs_Get + +```java +import com.azure.core.util.Context; + +/** Samples for LiveOutputs Get. */ +public final class LiveOutputsGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/liveoutput-list-by-name.json + */ + /** + * Sample code: Get a LiveOutput by name. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getALiveOutputByName(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .liveOutputs() + .getWithResponse("mediaresources", "slitestmedia10", "myLiveEvent1", "myLiveOutput1", Context.NONE); + } +} +``` + +### LiveOutputs_List + +```java +import com.azure.core.util.Context; + +/** Samples for LiveOutputs List. */ +public final class LiveOutputsListSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/liveoutput-list-all.json + */ + /** + * Sample code: List all LiveOutputs. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listAllLiveOutputs(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.liveOutputs().list("mediaresources", "slitestmedia10", "myLiveEvent1", Context.NONE); + } +} +``` + +### Locations_CheckNameAvailability + +```java +import com.azure.core.util.Context; +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 + */ + /** + * Sample code: Check Name Availability. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void checkNameAvailability(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .locations() + .checkNameAvailabilityWithResponse( + "japanwest", + new CheckNameAvailabilityInput().withName("contosotv").withType("videoAnalyzers"), + Context.NONE); + } +} +``` + +### Mediaservices_CreateOrUpdate + +```java +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.MediaServiceIdentity; +import com.azure.resourcemanager.mediaservices.models.ResourceIdentity; +import com.azure.resourcemanager.mediaservices.models.StorageAccount; +import com.azure.resourcemanager.mediaservices.models.StorageAccountType; +import com.azure.resourcemanager.mediaservices.models.StorageAuthentication; +import com.azure.resourcemanager.mediaservices.models.UserAssignedManagedIdentity; +import java.util.Arrays; +import java.util.HashMap; +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 + */ + /** + * Sample code: Create a Media Services account. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void createAMediaServicesAccount( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .mediaservices() + .define("contososports") + .withRegion("South Central US") + .withExistingResourceGroup("contoso") + .withTags(mapOf("key1", "value1", "key2", "value2")) + .withIdentity( + new MediaServiceIdentity() + .withType("UserAssigned") + .withUserAssignedIdentities( + mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1", + new UserAssignedManagedIdentity(), + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2", + new UserAssignedManagedIdentity()))) + .withStorageAccounts( + Arrays + .asList( + new StorageAccount() + .withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Storage/storageAccounts/contososportsstore") + .withType(StorageAccountType.PRIMARY) + .withIdentity( + new ResourceIdentity() + .withUserAssignedIdentity( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/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") + .withUseSystemAssignedIdentity(false))) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Mediaservices_Delete + +```java +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 + */ + /** + * Sample code: Delete a Media Services account. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void deleteAMediaServicesAccount( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.mediaservices().deleteWithResponse("contoso", "contososports", Context.NONE); + } +} +``` + +### Mediaservices_GetByResourceGroup + +```java +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 + */ + /** + * Sample code: Get a Media Services account by name. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getAMediaServicesAccountByName( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.mediaservices().getByResourceGroupWithResponse("contoso", "contosotv", Context.NONE); + } +} +``` + +### Mediaservices_List + +```java +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 + */ + /** + * Sample code: List all Media Services accounts. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listAllMediaServicesAccounts( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.mediaservices().list(Context.NONE); + } +} +``` + +### Mediaservices_ListByResourceGroup + +```java +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 + */ + /** + * Sample code: List all Media Services accounts. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listAllMediaServicesAccounts( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.mediaservices().listByResourceGroup("contoso", Context.NONE); + } +} +``` + +### Mediaservices_ListEdgePolicies + +```java +import com.azure.core.util.Context; +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 + */ + /** + * Sample code: List the media edge policies. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listTheMediaEdgePolicies(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .mediaservices() + .listEdgePoliciesWithResponse( + "contoso", + "contososports", + new ListEdgePoliciesInput().withDeviceId("contosiothubhost_contosoiotdevice"), + Context.NONE); + } +} +``` + +### Mediaservices_SyncStorageKeys + +```java +import com.azure.core.util.Context; +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 + */ + /** + * Sample code: Synchronizes Storage Account Keys. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void synchronizesStorageAccountKeys( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .mediaservices() + .syncStorageKeysWithResponse( + "contoso", "contososports", new SyncStorageKeysInput().withId("contososportsstore"), Context.NONE); + } +} +``` + +### Mediaservices_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.mediaservices.models.MediaService; +import java.util.HashMap; +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 + */ + /** + * Sample code: Update a Media Services accounts. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void updateAMediaServicesAccounts( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + MediaService resource = + manager.mediaservices().getByResourceGroupWithResponse("contoso", "contososports", Context.NONE).getValue(); + resource.update().withTags(mapOf("key1", "value3")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Operations_List + +```java +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 + */ + /** + * Sample code: List Operations. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listOperations(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.operations().listWithResponse(Context.NONE); + } +} +``` + +### PrivateEndpointConnections_CreateOrUpdate + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.mediaservices.models.PrivateEndpointConnection; +import com.azure.resourcemanager.mediaservices.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.mediaservices.models.PrivateLinkServiceConnectionState; + +/** 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 + */ + /** + * Sample code: Update private endpoint connection. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void updatePrivateEndpointConnection( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + PrivateEndpointConnection resource = + manager + .privateEndpointConnections() + .getWithResponse("contoso", "contososports", "connectionName1", Context.NONE) + .getValue(); + resource + .update() + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState() + .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withDescription("Test description.")) + .apply(); + } +} +``` + +### PrivateEndpointConnections_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for PrivateEndpointConnections Delete. */ +public final class PrivateEndpointConnectionsDeleteSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/private-endpoint-connection-delete.json + */ + /** + * Sample code: Delete private endpoint connection. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void deletePrivateEndpointConnection( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .privateEndpointConnections() + .deleteWithResponse("contoso", "contososports", "connectionName1", Context.NONE); + } +} +``` + +### PrivateEndpointConnections_Get + +```java +import com.azure.core.util.Context; + +/** Samples for PrivateEndpointConnections Get. */ +public final class PrivateEndpointConnectionsGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/private-endpoint-connection-get-by-name.json + */ + /** + * Sample code: Get private endpoint connection. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getPrivateEndpointConnection( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .privateEndpointConnections() + .getWithResponse("contoso", "contososports", "connectionName1", Context.NONE); + } +} +``` + +### PrivateEndpointConnections_List + +```java +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 + */ + /** + * Sample code: Get all private endpoint connections. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getAllPrivateEndpointConnections( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.privateEndpointConnections().listWithResponse("contoso", "contososports", Context.NONE); + } +} +``` + +### PrivateLinkResources_Get + +```java +import com.azure.core.util.Context; + +/** Samples for PrivateLinkResources Get. */ +public final class PrivateLinkResourcesGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/private-link-resources-get-by-name.json + */ + /** + * Sample code: Get details of a group ID. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getDetailsOfAGroupID(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.privateLinkResources().getWithResponse("contoso", "contososports", "keydelivery", Context.NONE); + } +} +``` + +### PrivateLinkResources_List + +```java +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 + */ + /** + * Sample code: Get list of all group IDs. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getListOfAllGroupIDs(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.privateLinkResources().listWithResponse("contoso", "contososports", Context.NONE); + } +} +``` + +### StreamingEndpoints_Create + +```java +import com.azure.resourcemanager.mediaservices.models.AkamaiAccessControl; +import com.azure.resourcemanager.mediaservices.models.AkamaiSignatureHeaderAuthenticationKey; +import com.azure.resourcemanager.mediaservices.models.IpAccessControl; +import com.azure.resourcemanager.mediaservices.models.IpRange; +import com.azure.resourcemanager.mediaservices.models.StreamingEndpointAccessControl; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for StreamingEndpoints Create. */ +public final class StreamingEndpointsCreateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streamingendpoint-create.json + */ + /** + * Sample code: Create a streaming endpoint. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void createAStreamingEndpoint(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .streamingEndpoints() + .define("myStreamingEndpoint1") + .withRegion("West US") + .withExistingMediaservice("mediaresources", "slitestmedia10") + .withTags(mapOf("tag1", "value1", "tag2", "value2")) + .withDescription("test event 1") + .withScaleUnits(1) + .withAvailabilitySetName("availableset") + .withAccessControl( + new StreamingEndpointAccessControl() + .withAkamai( + new AkamaiAccessControl() + .withAkamaiSignatureHeaderAuthenticationKeyList( + Arrays + .asList( + new AkamaiSignatureHeaderAuthenticationKey() + .withIdentifier("id1") + .withBase64Key("dGVzdGlkMQ==") + .withExpiration(OffsetDateTime.parse("2029-12-31T16:00:00-08:00")), + new AkamaiSignatureHeaderAuthenticationKey() + .withIdentifier("id2") + .withBase64Key("dGVzdGlkMQ==") + .withExpiration(OffsetDateTime.parse("2030-12-31T16:00:00-08:00"))))) + .withIp( + new IpAccessControl() + .withAllow(Arrays.asList(new IpRange().withName("AllowedIp").withAddress("192.168.1.1"))))) + .withCdnEnabled(false) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### StreamingEndpoints_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for StreamingEndpoints Delete. */ +public final class StreamingEndpointsDeleteSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streamingendpoint-delete.json + */ + /** + * Sample code: Delete a streaming endpoint. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void deleteAStreamingEndpoint(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.streamingEndpoints().delete("mediaresources", "slitestmedia10", "myStreamingEndpoint1", Context.NONE); + } +} +``` + +### StreamingEndpoints_Get + +```java +import com.azure.core.util.Context; + +/** Samples for StreamingEndpoints Get. */ +public final class StreamingEndpointsGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streamingendpoint-list-by-name.json + */ + /** + * Sample code: Get a streaming endpoint by name. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getAStreamingEndpointByName( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .streamingEndpoints() + .getWithResponse("mediaresources", "slitestmedia10", "myStreamingEndpoint1", Context.NONE); + } +} +``` + +### StreamingEndpoints_List + +```java +import com.azure.core.util.Context; + +/** Samples for StreamingEndpoints List. */ +public final class StreamingEndpointsListSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streamingendpoint-list-all.json + */ + /** + * Sample code: List all streaming endpoints. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listAllStreamingEndpoints(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.streamingEndpoints().list("mediaresources", "slitestmedia10", Context.NONE); + } +} +``` + +### StreamingEndpoints_Scale + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.mediaservices.models.StreamingEntityScaleUnit; + +/** Samples for StreamingEndpoints Scale. */ +public final class StreamingEndpointsScaleSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streamingendpoint-scale.json + */ + /** + * Sample code: Scale a StreamingEndpoint. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void scaleAStreamingEndpoint(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .streamingEndpoints() + .scale( + "mediaresources", + "slitestmedia10", + "myStreamingEndpoint1", + new StreamingEntityScaleUnit().withScaleUnit(5), + Context.NONE); + } +} +``` + +### StreamingEndpoints_Start + +```java +import com.azure.core.util.Context; + +/** Samples for StreamingEndpoints Start. */ +public final class StreamingEndpointsStartSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streamingendpoint-start.json + */ + /** + * Sample code: Start a streaming endpoint. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void startAStreamingEndpoint(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.streamingEndpoints().start("mediaresources", "slitestmedia10", "myStreamingEndpoint1", Context.NONE); + } +} +``` + +### StreamingEndpoints_Stop + +```java +import com.azure.core.util.Context; + +/** Samples for StreamingEndpoints Stop. */ +public final class StreamingEndpointsStopSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streamingendpoint-stop.json + */ + /** + * Sample code: Stop a streaming endpoint. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void stopAStreamingEndpoint(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.streamingEndpoints().stop("mediaresources", "slitestmedia10", "myStreamingEndpoint1", Context.NONE); + } +} +``` + +### StreamingEndpoints_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.mediaservices.models.StreamingEndpoint; +import java.util.HashMap; +import java.util.Map; + +/** Samples for StreamingEndpoints Update. */ +public final class StreamingEndpointsUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streamingendpoint-update.json + */ + /** + * Sample code: Update a streaming endpoint. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void updateAStreamingEndpoint(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + StreamingEndpoint resource = + manager + .streamingEndpoints() + .getWithResponse("mediaresources", "slitestmedia10", "myStreamingEndpoint1", Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("tag3", "value3", "tag5", "value5")) + .withDescription("test event 2") + .withScaleUnits(5) + .withAvailabilitySetName("availableset") + .apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### StreamingLocators_Create + +```java +import com.azure.resourcemanager.mediaservices.models.StreamingLocatorContentKey; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; + +/** Samples for StreamingLocators Create. */ +public final class StreamingLocatorsCreateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-locators-create-clear.json + */ + /** + * Sample code: Creates a Streaming Locator with clear streaming. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void createsAStreamingLocatorWithClearStreaming( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .streamingLocators() + .define("UserCreatedClearStreamingLocator") + .withExistingMediaService("contoso", "contosomedia") + .withAssetName("ClimbingMountRainier") + .withStreamingPolicyName("clearStreamingPolicy") + .create(); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-locators-create-secure.json + */ + /** + * Sample code: Creates a Streaming Locator with secure streaming. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void createsAStreamingLocatorWithSecureStreaming( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .streamingLocators() + .define("UserCreatedSecureStreamingLocator") + .withExistingMediaService("contoso", "contosomedia") + .withAssetName("ClimbingMountRainier") + .withStartTime(OffsetDateTime.parse("2018-03-01T00:00:00Z")) + .withEndTime(OffsetDateTime.parse("2028-12-31T23:59:59.9999999Z")) + .withStreamingPolicyName("secureStreamingPolicy") + .create(); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-locators-create-secure-userDefinedContentKeys.json + */ + /** + * Sample code: Creates a Streaming Locator with user defined content keys. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void createsAStreamingLocatorWithUserDefinedContentKeys( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .streamingLocators() + .define("UserCreatedSecureStreamingLocatorWithUserDefinedContentKeys") + .withExistingMediaService("contoso", "contosomedia") + .withAssetName("ClimbingMountRainier") + .withStreamingLocatorId(UUID.fromString("90000000-0000-0000-0000-00000000000A")) + .withStreamingPolicyName("secureStreamingPolicy") + .withContentKeys( + Arrays + .asList( + new StreamingLocatorContentKey() + .withId(UUID.fromString("60000000-0000-0000-0000-000000000001")) + .withLabelReferenceInStreamingPolicy("aesDefaultKey") + .withValue("1UqLohAfWsEGkULYxHjYZg=="), + new StreamingLocatorContentKey() + .withId(UUID.fromString("60000000-0000-0000-0000-000000000004")) + .withLabelReferenceInStreamingPolicy("cencDefaultKey") + .withValue("4UqLohAfWsEGkULYxHjYZg=="), + new StreamingLocatorContentKey() + .withId(UUID.fromString("60000000-0000-0000-0000-000000000007")) + .withLabelReferenceInStreamingPolicy("cbcsDefaultKey") + .withValue("7UqLohAfWsEGkULYxHjYZg=="))) + .create(); + } +} +``` + +### StreamingLocators_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for StreamingLocators Delete. */ +public final class StreamingLocatorsDeleteSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-locators-delete.json + */ + /** + * Sample code: Delete a Streaming Locator. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void deleteAStreamingLocator(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .streamingLocators() + .deleteWithResponse("contoso", "contosomedia", "clearStreamingLocator", Context.NONE); + } +} +``` + +### StreamingLocators_Get + +```java +import com.azure.core.util.Context; + +/** Samples for StreamingLocators Get. */ +public final class StreamingLocatorsGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-locators-get-by-name.json + */ + /** + * Sample code: Get a Streaming Locator by name. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getAStreamingLocatorByName( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.streamingLocators().getWithResponse("contoso", "contosomedia", "clearStreamingLocator", Context.NONE); + } +} +``` + +### StreamingLocators_List + +```java +import com.azure.core.util.Context; + +/** Samples for StreamingLocators List. */ +public final class StreamingLocatorsListSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-locators-list.json + */ + /** + * Sample code: Lists Streaming Locators. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listsStreamingLocators(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.streamingLocators().list("contoso", "contosomedia", null, null, null, Context.NONE); + } +} +``` + +### StreamingLocators_ListContentKeys + +```java +import com.azure.core.util.Context; + +/** Samples for StreamingLocators ListContentKeys. */ +public final class StreamingLocatorsListContentKeysSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-locators-list-content-keys.json + */ + /** + * Sample code: List Content Keys. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listContentKeys(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .streamingLocators() + .listContentKeysWithResponse("contoso", "contosomedia", "secureStreamingLocator", Context.NONE); + } +} +``` + +### StreamingLocators_ListPaths + +```java +import com.azure.core.util.Context; + +/** Samples for StreamingLocators ListPaths. */ +public final class StreamingLocatorsListPathsSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-locators-list-paths-streaming-only.json + */ + /** + * Sample code: List Paths which has streaming paths only. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listPathsWhichHasStreamingPathsOnly( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .streamingLocators() + .listPathsWithResponse("contoso", "contosomedia", "secureStreamingLocator", Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-locators-list-paths-streaming-and-download.json + */ + /** + * Sample code: List Paths which has streaming paths and download paths. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listPathsWhichHasStreamingPathsAndDownloadPaths( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .streamingLocators() + .listPathsWithResponse("contoso", "contosomedia", "clearStreamingLocator", Context.NONE); + } +} +``` + +### StreamingPolicies_Create + +```java +import com.azure.resourcemanager.mediaservices.models.CbcsDrmConfiguration; +import com.azure.resourcemanager.mediaservices.models.CencDrmConfiguration; +import com.azure.resourcemanager.mediaservices.models.CommonEncryptionCbcs; +import com.azure.resourcemanager.mediaservices.models.CommonEncryptionCenc; +import com.azure.resourcemanager.mediaservices.models.DefaultKey; +import com.azure.resourcemanager.mediaservices.models.EnabledProtocols; +import com.azure.resourcemanager.mediaservices.models.EnvelopeEncryption; +import com.azure.resourcemanager.mediaservices.models.NoEncryption; +import com.azure.resourcemanager.mediaservices.models.StreamingPolicyContentKeys; +import com.azure.resourcemanager.mediaservices.models.StreamingPolicyFairPlayConfiguration; +import com.azure.resourcemanager.mediaservices.models.StreamingPolicyPlayReadyConfiguration; +import com.azure.resourcemanager.mediaservices.models.StreamingPolicyWidevineConfiguration; +import com.azure.resourcemanager.mediaservices.models.TrackPropertyCompareOperation; +import com.azure.resourcemanager.mediaservices.models.TrackPropertyCondition; +import com.azure.resourcemanager.mediaservices.models.TrackPropertyType; +import com.azure.resourcemanager.mediaservices.models.TrackSelection; +import java.util.Arrays; + +/** Samples for StreamingPolicies Create. */ +public final class StreamingPoliciesCreateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-policies-create-secure-streaming.json + */ + /** + * Sample code: Creates a Streaming Policy with secure streaming. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void createsAStreamingPolicyWithSecureStreaming( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .streamingPolicies() + .define("UserCreatedSecureStreamingPolicy") + .withExistingMediaService("contoso", "contosomedia") + .withDefaultContentKeyPolicyName("PolicyWithMultipleOptions") + .withEnvelopeEncryption( + new EnvelopeEncryption() + .withEnabledProtocols( + new EnabledProtocols() + .withDownload(false) + .withDash(true) + .withHls(true) + .withSmoothStreaming(true)) + .withContentKeys( + new StreamingPolicyContentKeys().withDefaultKey(new DefaultKey().withLabel("aesDefaultKey"))) + .withCustomKeyAcquisitionUrlTemplate( + "https://contoso.com/{AssetAlternativeId}/envelope/{ContentKeyId}")) + .withCommonEncryptionCenc( + new CommonEncryptionCenc() + .withEnabledProtocols( + new EnabledProtocols() + .withDownload(false) + .withDash(true) + .withHls(false) + .withSmoothStreaming(true)) + .withClearTracks( + Arrays + .asList( + new TrackSelection() + .withTrackSelections( + Arrays + .asList( + new TrackPropertyCondition() + .withProperty(TrackPropertyType.FOUR_CC) + .withOperation(TrackPropertyCompareOperation.EQUAL) + .withValue("hev1"))))) + .withContentKeys( + new StreamingPolicyContentKeys().withDefaultKey(new DefaultKey().withLabel("cencDefaultKey"))) + .withDrm( + new CencDrmConfiguration() + .withPlayReady( + new StreamingPolicyPlayReadyConfiguration() + .withCustomLicenseAcquisitionUrlTemplate( + "https://contoso.com/{AssetAlternativeId}/playready/{ContentKeyId}") + .withPlayReadyCustomAttributes("PlayReady CustomAttributes")) + .withWidevine( + new StreamingPolicyWidevineConfiguration() + .withCustomLicenseAcquisitionUrlTemplate( + "https://contoso.com/{AssetAlternativeId}/widevine/{ContentKeyId")))) + .withCommonEncryptionCbcs( + new CommonEncryptionCbcs() + .withEnabledProtocols( + new EnabledProtocols() + .withDownload(false) + .withDash(false) + .withHls(true) + .withSmoothStreaming(false)) + .withContentKeys( + new StreamingPolicyContentKeys().withDefaultKey(new DefaultKey().withLabel("cbcsDefaultKey"))) + .withDrm( + new CbcsDrmConfiguration() + .withFairPlay( + new StreamingPolicyFairPlayConfiguration() + .withCustomLicenseAcquisitionUrlTemplate( + "https://contoso.com/{AssetAlternativeId}/fairplay/{ContentKeyId}") + .withAllowPersistentLicense(true)))) + .create(); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-policies-create-commonEncryptionCenc-only.json + */ + /** + * Sample code: Creates a Streaming Policy with commonEncryptionCenc only. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void createsAStreamingPolicyWithCommonEncryptionCencOnly( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .streamingPolicies() + .define("UserCreatedSecureStreamingPolicyWithCommonEncryptionCencOnly") + .withExistingMediaService("contoso", "contosomedia") + .withDefaultContentKeyPolicyName("PolicyWithPlayReadyOptionAndOpenRestriction") + .withCommonEncryptionCenc( + new CommonEncryptionCenc() + .withEnabledProtocols( + new EnabledProtocols() + .withDownload(false) + .withDash(true) + .withHls(false) + .withSmoothStreaming(true)) + .withClearTracks( + Arrays + .asList( + new TrackSelection() + .withTrackSelections( + Arrays + .asList( + new TrackPropertyCondition() + .withProperty(TrackPropertyType.FOUR_CC) + .withOperation(TrackPropertyCompareOperation.EQUAL) + .withValue("hev1"))))) + .withContentKeys( + new StreamingPolicyContentKeys().withDefaultKey(new DefaultKey().withLabel("cencDefaultKey"))) + .withDrm( + new CencDrmConfiguration() + .withPlayReady( + new StreamingPolicyPlayReadyConfiguration() + .withCustomLicenseAcquisitionUrlTemplate( + "https://contoso.com/{AssetAlternativeId}/playready/{ContentKeyId}") + .withPlayReadyCustomAttributes("PlayReady CustomAttributes")) + .withWidevine( + new StreamingPolicyWidevineConfiguration() + .withCustomLicenseAcquisitionUrlTemplate( + "https://contoso.com/{AssetAlternativeId}/widevine/{ContentKeyId")))) + .create(); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-policies-create-commonEncryptionCbcs-only.json + */ + /** + * Sample code: Creates a Streaming Policy with commonEncryptionCbcs only. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void createsAStreamingPolicyWithCommonEncryptionCbcsOnly( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .streamingPolicies() + .define("UserCreatedSecureStreamingPolicyWithCommonEncryptionCbcsOnly") + .withExistingMediaService("contoso", "contosomedia") + .withDefaultContentKeyPolicyName("PolicyWithMultipleOptions") + .withCommonEncryptionCbcs( + new CommonEncryptionCbcs() + .withEnabledProtocols( + new EnabledProtocols() + .withDownload(false) + .withDash(false) + .withHls(true) + .withSmoothStreaming(false)) + .withContentKeys( + new StreamingPolicyContentKeys().withDefaultKey(new DefaultKey().withLabel("cbcsDefaultKey"))) + .withDrm( + new CbcsDrmConfiguration() + .withFairPlay( + new StreamingPolicyFairPlayConfiguration() + .withCustomLicenseAcquisitionUrlTemplate( + "https://contoso.com/{AssetAlternativeId}/fairplay/{ContentKeyId}") + .withAllowPersistentLicense(true)))) + .create(); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-policies-create-clear.json + */ + /** + * Sample code: Creates a Streaming Policy with clear streaming. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void createsAStreamingPolicyWithClearStreaming( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .streamingPolicies() + .define("UserCreatedClearStreamingPolicy") + .withExistingMediaService("contoso", "contosomedia") + .withNoEncryption( + new NoEncryption() + .withEnabledProtocols( + new EnabledProtocols() + .withDownload(true) + .withDash(true) + .withHls(true) + .withSmoothStreaming(true))) + .create(); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-policies-create-envelopeEncryption-only.json + */ + /** + * Sample code: Creates a Streaming Policy with envelopeEncryption only. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void createsAStreamingPolicyWithEnvelopeEncryptionOnly( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .streamingPolicies() + .define("UserCreatedSecureStreamingPolicyWithEnvelopeEncryptionOnly") + .withExistingMediaService("contoso", "contosomedia") + .withDefaultContentKeyPolicyName("PolicyWithClearKeyOptionAndTokenRestriction") + .withEnvelopeEncryption( + new EnvelopeEncryption() + .withEnabledProtocols( + new EnabledProtocols() + .withDownload(false) + .withDash(true) + .withHls(true) + .withSmoothStreaming(true)) + .withContentKeys( + new StreamingPolicyContentKeys().withDefaultKey(new DefaultKey().withLabel("aesDefaultKey"))) + .withCustomKeyAcquisitionUrlTemplate( + "https://contoso.com/{AssetAlternativeId}/envelope/{ContentKeyId}")) + .create(); + } +} +``` + +### StreamingPolicies_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for StreamingPolicies Delete. */ +public final class StreamingPoliciesDeleteSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-policies-delete.json + */ + /** + * Sample code: Delete a Streaming Policy. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void deleteAStreamingPolicy(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .streamingPolicies() + .deleteWithResponse( + "contoso", "contosomedia", "secureStreamingPolicyWithCommonEncryptionCbcsOnly", Context.NONE); + } +} +``` + +### StreamingPolicies_Get + +```java +import com.azure.core.util.Context; + +/** Samples for StreamingPolicies Get. */ +public final class StreamingPoliciesGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-policy-get-by-name.json + */ + /** + * Sample code: Get a Streaming Policy by name. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getAStreamingPolicyByName(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.streamingPolicies().getWithResponse("contoso", "contosomedia", "clearStreamingPolicy", Context.NONE); + } +} +``` + +### StreamingPolicies_List + +```java +import com.azure.core.util.Context; + +/** Samples for StreamingPolicies List. */ +public final class StreamingPoliciesListSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-policies-list.json + */ + /** + * Sample code: Lists Streaming Policies. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listsStreamingPolicies(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.streamingPolicies().list("contoso", "contosomedia", null, null, null, Context.NONE); + } +} +``` + +### Transforms_CreateOrUpdate + +```java +import com.azure.resourcemanager.mediaservices.models.BuiltInStandardEncoderPreset; +import com.azure.resourcemanager.mediaservices.models.EncoderNamedPreset; +import com.azure.resourcemanager.mediaservices.models.TransformOutput; +import java.util.Arrays; + +/** Samples for Transforms CreateOrUpdate. */ +public final class TransformsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/transforms-create.json + */ + /** + * Sample code: Create or update a Transform. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void createOrUpdateATransform(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .transforms() + .define("createdTransform") + .withExistingMediaService("contosoresources", "contosomedia") + .withDescription("Example Transform to illustrate create and update.") + .withOutputs( + Arrays + .asList( + new TransformOutput() + .withPreset( + new BuiltInStandardEncoderPreset() + .withPresetName(EncoderNamedPreset.ADAPTIVE_STREAMING)))) + .create(); + } +} +``` + +### Transforms_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Transforms Delete. */ +public final class TransformsDeleteSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/transforms-delete.json + */ + /** + * Sample code: Delete a Transform. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void deleteATransform(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.transforms().deleteWithResponse("contosoresources", "contosomedia", "sampleTransform", Context.NONE); + } +} +``` + +### Transforms_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Transforms Get. */ +public final class TransformsGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/transforms-get-by-name.json + */ + /** + * Sample code: Get a Transform by name. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getATransformByName(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.transforms().getWithResponse("contosoresources", "contosomedia", "sampleTransform", Context.NONE); + } +} +``` + +### Transforms_List + +```java +import com.azure.core.util.Context; + +/** Samples for Transforms List. */ +public final class TransformsListSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/transforms-list-all-filter-by-created.json + */ + /** + * Sample code: Lists the Transforms filter by created. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listsTheTransformsFilterByCreated( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .transforms() + .list( + "contosoresources", + "contosomedia", + "properties/created gt 2021-06-01T00:00:00.0000000Z and properties/created le" + + " 2021-06-01T00:00:10.0000000Z", + "properties/created", + Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/transforms-list-all-filter-by-name.json + */ + /** + * Sample code: Lists the Transforms filter by name. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listsTheTransformsFilterByName( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .transforms() + .list( + "contosoresources", + "contosomedia", + "(name eq 'sampleEncode') or (name eq 'sampleEncodeAndVideoIndex')", + "name desc", + Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/transforms-list-all-filter-by-lastmodified.json + */ + /** + * Sample code: Lists the Transforms filter by lastmodified. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listsTheTransformsFilterByLastmodified( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .transforms() + .list( + "contosoresources", + "contosomedia", + "properties/lastmodified gt 2021-06-01T00:00:00.0000000Z and properties/lastmodified le" + + " 2021-06-01T00:00:10.0000000Z", + "properties/lastmodified desc", + Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/transforms-list-all.json + */ + /** + * Sample code: Lists the Transforms. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listsTheTransforms(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.transforms().list("contosoresources", "contosomedia", null, null, Context.NONE); + } +} +``` + +### Transforms_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.mediaservices.models.BuiltInStandardEncoderPreset; +import com.azure.resourcemanager.mediaservices.models.EncoderNamedPreset; +import com.azure.resourcemanager.mediaservices.models.Priority; +import com.azure.resourcemanager.mediaservices.models.Transform; +import com.azure.resourcemanager.mediaservices.models.TransformOutput; +import java.util.Arrays; + +/** Samples for Transforms Update. */ +public final class TransformsUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/transforms-update.json + */ + /** + * Sample code: Update a Transform. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void updateATransform(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + Transform resource = + manager + .transforms() + .getWithResponse("contosoresources", "contosomedia", "transformToUpdate", Context.NONE) + .getValue(); + resource + .update() + .withDescription("Example transform to illustrate update.") + .withOutputs( + Arrays + .asList( + new TransformOutput() + .withRelativePriority(Priority.HIGH) + .withPreset( + new BuiltInStandardEncoderPreset() + .withPresetName(EncoderNamedPreset.H264MULTIPLE_BITRATE720P)))) + .apply(); + } +} +``` -- [CreateOrUpdate](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/TransformsCreateOrUpdateSamples.java) -- [Delete](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/TransformsDeleteSamples.java) -- [Get](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/TransformsGetSamples.java) -- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/TransformsListSamples.java) -- [Update](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/TransformsUpdateSamples.java) diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml b/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml index a88741f07ef0..6401ff620165 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml @@ -67,7 +67,6 @@ revapi-maven-plugin 0.11.2 - true 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 056bd0d3a1d5..c1afc5be9160 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 @@ -230,7 +230,7 @@ public MediaServicesManager authenticate(TokenCredential credential, AzureProfil .append("-") .append("com.azure.resourcemanager.mediaservices") .append("/") - .append("1.1.0-beta.2"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/LiveEventsClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/LiveEventsClient.java index a08ead220ef7..07fa1709e92f 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/LiveEventsClient.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/LiveEventsClient.java @@ -24,7 +24,7 @@ public interface LiveEventsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the LiveEvent list result. + * @return liveEventListResult. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String accountName); @@ -38,7 +38,7 @@ public interface LiveEventsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the LiveEvent list result. + * @return liveEventListResult. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String accountName, Context context); @@ -86,7 +86,7 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the live event. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LiveEventInner> beginCreate( String resourceGroupName, String accountName, @@ -108,7 +108,7 @@ SyncPoller, LiveEventInner> beginCreate( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the live event. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LiveEventInner> beginCreate( String resourceGroupName, String accountName, @@ -189,7 +189,7 @@ LiveEventInner create( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the live event. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LiveEventInner> beginUpdate( String resourceGroupName, String accountName, String liveEventName, LiveEventInner parameters); @@ -206,7 +206,7 @@ SyncPoller, LiveEventInner> beginUpdate( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the live event. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LiveEventInner> beginUpdate( String resourceGroupName, String accountName, String liveEventName, LiveEventInner parameters, Context context); @@ -254,7 +254,7 @@ LiveEventInner update( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String liveEventName); /** @@ -269,7 +269,7 @@ LiveEventInner update( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, String liveEventName, Context context); @@ -311,7 +311,7 @@ SyncPoller, Void> beginDelete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginAllocate( String resourceGroupName, String accountName, String liveEventName); @@ -327,7 +327,7 @@ SyncPoller, Void> beginAllocate( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginAllocate( String resourceGroupName, String accountName, String liveEventName, Context context); @@ -369,7 +369,7 @@ SyncPoller, Void> beginAllocate( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStart(String resourceGroupName, String accountName, String liveEventName); /** @@ -384,7 +384,7 @@ SyncPoller, Void> beginAllocate( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStart( String resourceGroupName, String accountName, String liveEventName, Context context); @@ -427,7 +427,7 @@ SyncPoller, Void> beginStart( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStop( String resourceGroupName, String accountName, String liveEventName, LiveEventActionInput parameters); @@ -444,7 +444,7 @@ SyncPoller, Void> beginStop( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStop( String resourceGroupName, String accountName, @@ -499,7 +499,7 @@ void stop( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginReset(String resourceGroupName, String accountName, String liveEventName); /** @@ -516,7 +516,7 @@ void stop( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginReset( String resourceGroupName, String accountName, String liveEventName, Context context); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/LiveOutputsClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/LiveOutputsClient.java index f02c8906e67a..85565db98ba9 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/LiveOutputsClient.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/LiveOutputsClient.java @@ -24,7 +24,7 @@ public interface LiveOutputsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the LiveOutput list result. + * @return liveOutputListResult. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String accountName, String liveEventName); @@ -39,7 +39,7 @@ public interface LiveOutputsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the LiveOutput list result. + * @return liveOutputListResult. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -90,7 +90,7 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Live Output. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LiveOutputInner> beginCreate( String resourceGroupName, String accountName, @@ -112,7 +112,7 @@ SyncPoller, LiveOutputInner> beginCreate( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Live Output. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LiveOutputInner> beginCreate( String resourceGroupName, String accountName, @@ -177,7 +177,7 @@ LiveOutputInner create( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, String liveEventName, String liveOutputName); @@ -194,7 +194,7 @@ SyncPoller, Void> beginDelete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, String liveEventName, String liveOutputName, Context context); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/StreamingEndpointsClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/StreamingEndpointsClient.java index 26cb0f6ae3d2..876bcf2870b8 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/StreamingEndpointsClient.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/StreamingEndpointsClient.java @@ -24,7 +24,7 @@ public interface StreamingEndpointsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the streaming endpoint list result. + * @return streamingEndpointListResult. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String accountName); @@ -38,7 +38,7 @@ public interface StreamingEndpointsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the streaming endpoint list result. + * @return streamingEndpointListResult. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String accountName, Context context); @@ -86,7 +86,7 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the streaming endpoint. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, StreamingEndpointInner> beginCreate( String resourceGroupName, String accountName, @@ -108,7 +108,7 @@ SyncPoller, StreamingEndpointInner> beginCrea * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the streaming endpoint. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, StreamingEndpointInner> beginCreate( String resourceGroupName, String accountName, @@ -189,7 +189,7 @@ StreamingEndpointInner create( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the streaming endpoint. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, StreamingEndpointInner> beginUpdate( String resourceGroupName, String accountName, String streamingEndpointName, StreamingEndpointInner parameters); @@ -206,7 +206,7 @@ SyncPoller, StreamingEndpointInner> beginUpda * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the streaming endpoint. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, StreamingEndpointInner> beginUpdate( String resourceGroupName, String accountName, @@ -262,7 +262,7 @@ StreamingEndpointInner update( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, String streamingEndpointName); @@ -278,7 +278,7 @@ SyncPoller, Void> beginDelete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, String streamingEndpointName, Context context); @@ -320,7 +320,7 @@ SyncPoller, Void> beginDelete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStart( String resourceGroupName, String accountName, String streamingEndpointName); @@ -336,7 +336,7 @@ SyncPoller, Void> beginStart( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStart( String resourceGroupName, String accountName, String streamingEndpointName, Context context); @@ -378,7 +378,7 @@ SyncPoller, Void> beginStart( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStop( String resourceGroupName, String accountName, String streamingEndpointName); @@ -394,7 +394,7 @@ SyncPoller, Void> beginStop( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStop( String resourceGroupName, String accountName, String streamingEndpointName, Context context); @@ -437,7 +437,7 @@ SyncPoller, Void> beginStop( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginScale( String resourceGroupName, String accountName, @@ -457,7 +457,7 @@ SyncPoller, Void> beginScale( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginScale( String resourceGroupName, String accountName, diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/AccountFilterInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/AccountFilterInner.java index 2f5568962d98..88809436fcab 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/AccountFilterInner.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/AccountFilterInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; @@ -17,34 +16,30 @@ import java.util.List; /** An Account Filter. */ -@JsonFlatten @Fluent -public class AccountFilterInner extends ProxyResource { +public final class AccountFilterInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(AccountFilterInner.class); /* - * The system metadata relating to this resource. + * The Media Filter properties. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; + @JsonProperty(value = "properties") + private MediaFilterProperties innerProperties; /* - * The presentation time range. - */ - @JsonProperty(value = "properties.presentationTimeRange") - private PresentationTimeRange presentationTimeRange; - - /* - * The first quality. + * The system metadata relating to this resource. */ - @JsonProperty(value = "properties.firstQuality") - private FirstQuality firstQuality; + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; - /* - * The tracks selection conditions. + /** + * Get the innerProperties property: The Media Filter properties. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.tracks") - private List tracks; + private MediaFilterProperties innerProperties() { + return this.innerProperties; + } /** * Get the systemData property: The system metadata relating to this resource. @@ -61,7 +56,7 @@ public SystemData systemData() { * @return the presentationTimeRange value. */ public PresentationTimeRange presentationTimeRange() { - return this.presentationTimeRange; + return this.innerProperties() == null ? null : this.innerProperties().presentationTimeRange(); } /** @@ -71,7 +66,10 @@ public PresentationTimeRange presentationTimeRange() { * @return the AccountFilterInner object itself. */ public AccountFilterInner withPresentationTimeRange(PresentationTimeRange presentationTimeRange) { - this.presentationTimeRange = presentationTimeRange; + if (this.innerProperties() == null) { + this.innerProperties = new MediaFilterProperties(); + } + this.innerProperties().withPresentationTimeRange(presentationTimeRange); return this; } @@ -81,7 +79,7 @@ public AccountFilterInner withPresentationTimeRange(PresentationTimeRange presen * @return the firstQuality value. */ public FirstQuality firstQuality() { - return this.firstQuality; + return this.innerProperties() == null ? null : this.innerProperties().firstQuality(); } /** @@ -91,7 +89,10 @@ public FirstQuality firstQuality() { * @return the AccountFilterInner object itself. */ public AccountFilterInner withFirstQuality(FirstQuality firstQuality) { - this.firstQuality = firstQuality; + if (this.innerProperties() == null) { + this.innerProperties = new MediaFilterProperties(); + } + this.innerProperties().withFirstQuality(firstQuality); return this; } @@ -101,7 +102,7 @@ public AccountFilterInner withFirstQuality(FirstQuality firstQuality) { * @return the tracks value. */ public List tracks() { - return this.tracks; + return this.innerProperties() == null ? null : this.innerProperties().tracks(); } /** @@ -111,7 +112,10 @@ public List tracks() { * @return the AccountFilterInner object itself. */ public AccountFilterInner withTracks(List tracks) { - this.tracks = tracks; + if (this.innerProperties() == null) { + this.innerProperties = new MediaFilterProperties(); + } + this.innerProperties().withTracks(tracks); return this; } @@ -121,14 +125,8 @@ public AccountFilterInner withTracks(List tracks) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (presentationTimeRange() != null) { - presentationTimeRange().validate(); - } - if (firstQuality() != null) { - firstQuality().validate(); - } - if (tracks() != null) { - tracks().forEach(e -> e.validate()); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/AssetFilterInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/AssetFilterInner.java index be566f6265db..28844db4d536 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/AssetFilterInner.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/AssetFilterInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; @@ -17,34 +16,30 @@ import java.util.List; /** An Asset Filter. */ -@JsonFlatten @Fluent -public class AssetFilterInner extends ProxyResource { +public final class AssetFilterInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(AssetFilterInner.class); /* - * The system metadata relating to this resource. + * The Media Filter properties. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; + @JsonProperty(value = "properties") + private MediaFilterProperties innerProperties; /* - * The presentation time range. - */ - @JsonProperty(value = "properties.presentationTimeRange") - private PresentationTimeRange presentationTimeRange; - - /* - * The first quality. + * The system metadata relating to this resource. */ - @JsonProperty(value = "properties.firstQuality") - private FirstQuality firstQuality; + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; - /* - * The tracks selection conditions. + /** + * Get the innerProperties property: The Media Filter properties. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.tracks") - private List tracks; + private MediaFilterProperties innerProperties() { + return this.innerProperties; + } /** * Get the systemData property: The system metadata relating to this resource. @@ -61,7 +56,7 @@ public SystemData systemData() { * @return the presentationTimeRange value. */ public PresentationTimeRange presentationTimeRange() { - return this.presentationTimeRange; + return this.innerProperties() == null ? null : this.innerProperties().presentationTimeRange(); } /** @@ -71,7 +66,10 @@ public PresentationTimeRange presentationTimeRange() { * @return the AssetFilterInner object itself. */ public AssetFilterInner withPresentationTimeRange(PresentationTimeRange presentationTimeRange) { - this.presentationTimeRange = presentationTimeRange; + if (this.innerProperties() == null) { + this.innerProperties = new MediaFilterProperties(); + } + this.innerProperties().withPresentationTimeRange(presentationTimeRange); return this; } @@ -81,7 +79,7 @@ public AssetFilterInner withPresentationTimeRange(PresentationTimeRange presenta * @return the firstQuality value. */ public FirstQuality firstQuality() { - return this.firstQuality; + return this.innerProperties() == null ? null : this.innerProperties().firstQuality(); } /** @@ -91,7 +89,10 @@ public FirstQuality firstQuality() { * @return the AssetFilterInner object itself. */ public AssetFilterInner withFirstQuality(FirstQuality firstQuality) { - this.firstQuality = firstQuality; + if (this.innerProperties() == null) { + this.innerProperties = new MediaFilterProperties(); + } + this.innerProperties().withFirstQuality(firstQuality); return this; } @@ -101,7 +102,7 @@ public AssetFilterInner withFirstQuality(FirstQuality firstQuality) { * @return the tracks value. */ public List tracks() { - return this.tracks; + return this.innerProperties() == null ? null : this.innerProperties().tracks(); } /** @@ -111,7 +112,10 @@ public List tracks() { * @return the AssetFilterInner object itself. */ public AssetFilterInner withTracks(List tracks) { - this.tracks = tracks; + if (this.innerProperties() == null) { + this.innerProperties = new MediaFilterProperties(); + } + this.innerProperties().withTracks(tracks); return this; } @@ -121,14 +125,8 @@ public AssetFilterInner withTracks(List tracks) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (presentationTimeRange() != null) { - presentationTimeRange().validate(); - } - if (firstQuality() != null) { - firstQuality().validate(); - } - if (tracks() != null) { - tracks().forEach(e -> e.validate()); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/AssetInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/AssetInner.java index 46786ef6cb8b..cdce8ffe67f4 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/AssetInner.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/AssetInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; @@ -16,64 +15,30 @@ import java.util.UUID; /** An Asset. */ -@JsonFlatten @Fluent -public class AssetInner extends ProxyResource { +public final class AssetInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(AssetInner.class); /* - * The system metadata relating to this resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /* - * The Asset ID. - */ - @JsonProperty(value = "properties.assetId", access = JsonProperty.Access.WRITE_ONLY) - private UUID assetId; - - /* - * The creation date of the Asset. - */ - @JsonProperty(value = "properties.created", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime created; - - /* - * The last modified date of the Asset. - */ - @JsonProperty(value = "properties.lastModified", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModified; - - /* - * The alternate ID of the Asset. - */ - @JsonProperty(value = "properties.alternateId") - private String alternateId; - - /* - * The Asset description. - */ - @JsonProperty(value = "properties.description") - private String description; - - /* - * The name of the asset blob container. + * The resource properties. */ - @JsonProperty(value = "properties.container") - private String container; + @JsonProperty(value = "properties") + private AssetProperties innerProperties; /* - * The name of the storage account. + * The system metadata relating to this resource. */ - @JsonProperty(value = "properties.storageAccountName") - private String storageAccountName; + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; - /* - * The Asset encryption format. One of None or MediaStorageEncryption. + /** + * Get the innerProperties property: The resource properties. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.storageEncryptionFormat", access = JsonProperty.Access.WRITE_ONLY) - private AssetStorageEncryptionFormat storageEncryptionFormat; + private AssetProperties innerProperties() { + return this.innerProperties; + } /** * Get the systemData property: The system metadata relating to this resource. @@ -90,7 +55,7 @@ public SystemData systemData() { * @return the assetId value. */ public UUID assetId() { - return this.assetId; + return this.innerProperties() == null ? null : this.innerProperties().assetId(); } /** @@ -99,7 +64,7 @@ public UUID assetId() { * @return the created value. */ public OffsetDateTime created() { - return this.created; + return this.innerProperties() == null ? null : this.innerProperties().created(); } /** @@ -108,7 +73,7 @@ public OffsetDateTime created() { * @return the lastModified value. */ public OffsetDateTime lastModified() { - return this.lastModified; + return this.innerProperties() == null ? null : this.innerProperties().lastModified(); } /** @@ -117,7 +82,7 @@ public OffsetDateTime lastModified() { * @return the alternateId value. */ public String alternateId() { - return this.alternateId; + return this.innerProperties() == null ? null : this.innerProperties().alternateId(); } /** @@ -127,7 +92,10 @@ public String alternateId() { * @return the AssetInner object itself. */ public AssetInner withAlternateId(String alternateId) { - this.alternateId = alternateId; + if (this.innerProperties() == null) { + this.innerProperties = new AssetProperties(); + } + this.innerProperties().withAlternateId(alternateId); return this; } @@ -137,7 +105,7 @@ public AssetInner withAlternateId(String alternateId) { * @return the description value. */ public String description() { - return this.description; + return this.innerProperties() == null ? null : this.innerProperties().description(); } /** @@ -147,7 +115,10 @@ public String description() { * @return the AssetInner object itself. */ public AssetInner withDescription(String description) { - this.description = description; + if (this.innerProperties() == null) { + this.innerProperties = new AssetProperties(); + } + this.innerProperties().withDescription(description); return this; } @@ -157,7 +128,7 @@ public AssetInner withDescription(String description) { * @return the container value. */ public String container() { - return this.container; + return this.innerProperties() == null ? null : this.innerProperties().container(); } /** @@ -167,7 +138,10 @@ public String container() { * @return the AssetInner object itself. */ public AssetInner withContainer(String container) { - this.container = container; + if (this.innerProperties() == null) { + this.innerProperties = new AssetProperties(); + } + this.innerProperties().withContainer(container); return this; } @@ -177,7 +151,7 @@ public AssetInner withContainer(String container) { * @return the storageAccountName value. */ public String storageAccountName() { - return this.storageAccountName; + return this.innerProperties() == null ? null : this.innerProperties().storageAccountName(); } /** @@ -187,7 +161,10 @@ public String storageAccountName() { * @return the AssetInner object itself. */ public AssetInner withStorageAccountName(String storageAccountName) { - this.storageAccountName = storageAccountName; + if (this.innerProperties() == null) { + this.innerProperties = new AssetProperties(); + } + this.innerProperties().withStorageAccountName(storageAccountName); return this; } @@ -197,7 +174,7 @@ public AssetInner withStorageAccountName(String storageAccountName) { * @return the storageEncryptionFormat value. */ public AssetStorageEncryptionFormat storageEncryptionFormat() { - return this.storageEncryptionFormat; + return this.innerProperties() == null ? null : this.innerProperties().storageEncryptionFormat(); } /** @@ -206,5 +183,8 @@ public AssetStorageEncryptionFormat storageEncryptionFormat() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/AssetProperties.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/AssetProperties.java new file mode 100644 index 000000000000..d64a31ae0a04 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/AssetProperties.java @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mediaservices.models.AssetStorageEncryptionFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.UUID; + +/** The Asset properties. */ +@Fluent +public final class AssetProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AssetProperties.class); + + /* + * The Asset ID. + */ + @JsonProperty(value = "assetId", access = JsonProperty.Access.WRITE_ONLY) + private UUID assetId; + + /* + * The creation date of the Asset. + */ + @JsonProperty(value = "created", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime created; + + /* + * The last modified date of the Asset. + */ + @JsonProperty(value = "lastModified", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastModified; + + /* + * The alternate ID of the Asset. + */ + @JsonProperty(value = "alternateId") + private String alternateId; + + /* + * The Asset description. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The name of the asset blob container. + */ + @JsonProperty(value = "container") + private String container; + + /* + * The name of the storage account. + */ + @JsonProperty(value = "storageAccountName") + private String storageAccountName; + + /* + * The Asset encryption format. One of None or MediaStorageEncryption. + */ + @JsonProperty(value = "storageEncryptionFormat", access = JsonProperty.Access.WRITE_ONLY) + private AssetStorageEncryptionFormat storageEncryptionFormat; + + /** + * Get the assetId property: The Asset ID. + * + * @return the assetId value. + */ + public UUID assetId() { + return this.assetId; + } + + /** + * Get the created property: The creation date of the Asset. + * + * @return the created value. + */ + public OffsetDateTime created() { + return this.created; + } + + /** + * Get the lastModified property: The last modified date of the Asset. + * + * @return the lastModified value. + */ + public OffsetDateTime lastModified() { + return this.lastModified; + } + + /** + * Get the alternateId property: The alternate ID of the Asset. + * + * @return the alternateId value. + */ + public String alternateId() { + return this.alternateId; + } + + /** + * Set the alternateId property: The alternate ID of the Asset. + * + * @param alternateId the alternateId value to set. + * @return the AssetProperties object itself. + */ + public AssetProperties withAlternateId(String alternateId) { + this.alternateId = alternateId; + return this; + } + + /** + * Get the description property: The Asset description. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The Asset description. + * + * @param description the description value to set. + * @return the AssetProperties object itself. + */ + public AssetProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the container property: The name of the asset blob container. + * + * @return the container value. + */ + public String container() { + return this.container; + } + + /** + * Set the container property: The name of the asset blob container. + * + * @param container the container value to set. + * @return the AssetProperties object itself. + */ + public AssetProperties withContainer(String container) { + this.container = container; + return this; + } + + /** + * Get the storageAccountName property: The name of the storage account. + * + * @return the storageAccountName value. + */ + public String storageAccountName() { + return this.storageAccountName; + } + + /** + * Set the storageAccountName property: The name of the storage account. + * + * @param storageAccountName the storageAccountName value to set. + * @return the AssetProperties object itself. + */ + public AssetProperties withStorageAccountName(String storageAccountName) { + this.storageAccountName = storageAccountName; + return this; + } + + /** + * Get the storageEncryptionFormat property: The Asset encryption format. One of None or MediaStorageEncryption. + * + * @return the storageEncryptionFormat value. + */ + public AssetStorageEncryptionFormat storageEncryptionFormat() { + return this.storageEncryptionFormat; + } + + /** + * 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/fluent/models/ContentKeyPolicyInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/ContentKeyPolicyInner.java index 84ce6a6cc66f..341a27cd3c3d 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/ContentKeyPolicyInner.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/ContentKeyPolicyInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; @@ -17,46 +16,30 @@ import java.util.UUID; /** A Content Key Policy resource. */ -@JsonFlatten @Fluent -public class ContentKeyPolicyInner extends ProxyResource { +public final class ContentKeyPolicyInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(ContentKeyPolicyInner.class); /* - * The system metadata relating to this resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /* - * The legacy Policy ID. + * The properties of the Content Key Policy. */ - @JsonProperty(value = "properties.policyId", access = JsonProperty.Access.WRITE_ONLY) - private UUID policyId; + @JsonProperty(value = "properties") + private ContentKeyPolicyPropertiesInner innerProperties; /* - * The creation date of the Policy - */ - @JsonProperty(value = "properties.created", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime created; - - /* - * The last modified date of the Policy - */ - @JsonProperty(value = "properties.lastModified", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModified; - - /* - * A description for the Policy. + * The system metadata relating to this resource. */ - @JsonProperty(value = "properties.description") - private String description; + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; - /* - * The Key Policy options. + /** + * Get the innerProperties property: The properties of the Content Key Policy. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.options") - private List options; + private ContentKeyPolicyPropertiesInner innerProperties() { + return this.innerProperties; + } /** * Get the systemData property: The system metadata relating to this resource. @@ -73,7 +56,7 @@ public SystemData systemData() { * @return the policyId value. */ public UUID policyId() { - return this.policyId; + return this.innerProperties() == null ? null : this.innerProperties().policyId(); } /** @@ -82,7 +65,7 @@ public UUID policyId() { * @return the created value. */ public OffsetDateTime created() { - return this.created; + return this.innerProperties() == null ? null : this.innerProperties().created(); } /** @@ -91,7 +74,7 @@ public OffsetDateTime created() { * @return the lastModified value. */ public OffsetDateTime lastModified() { - return this.lastModified; + return this.innerProperties() == null ? null : this.innerProperties().lastModified(); } /** @@ -100,7 +83,7 @@ public OffsetDateTime lastModified() { * @return the description value. */ public String description() { - return this.description; + return this.innerProperties() == null ? null : this.innerProperties().description(); } /** @@ -110,7 +93,10 @@ public String description() { * @return the ContentKeyPolicyInner object itself. */ public ContentKeyPolicyInner withDescription(String description) { - this.description = description; + if (this.innerProperties() == null) { + this.innerProperties = new ContentKeyPolicyPropertiesInner(); + } + this.innerProperties().withDescription(description); return this; } @@ -120,7 +106,7 @@ public ContentKeyPolicyInner withDescription(String description) { * @return the options value. */ public List options() { - return this.options; + return this.innerProperties() == null ? null : this.innerProperties().options(); } /** @@ -130,7 +116,10 @@ public List options() { * @return the ContentKeyPolicyInner object itself. */ public ContentKeyPolicyInner withOptions(List options) { - this.options = options; + if (this.innerProperties() == null) { + this.innerProperties = new ContentKeyPolicyPropertiesInner(); + } + this.innerProperties().withOptions(options); return this; } @@ -140,8 +129,8 @@ public ContentKeyPolicyInner withOptions(List options) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (options() != null) { - options().forEach(e -> e.validate()); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/JobInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/JobInner.java index b048a694c7e4..74a73240b9fe 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/JobInner.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/JobInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; @@ -23,81 +22,30 @@ * A Job resource type. The progress and state can be obtained by polling a Job or subscribing to events using * EventGrid. */ -@JsonFlatten @Fluent -public class JobInner extends ProxyResource { +public final class JobInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(JobInner.class); /* - * The system metadata relating to this resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /* - * The UTC date and time when the customer has created the Job, in - * 'YYYY-MM-DDThh:mm:ssZ' format. - */ - @JsonProperty(value = "properties.created", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime created; - - /* - * The current state of the job. - */ - @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) - private JobState state; - - /* - * Optional customer supplied description of the Job. - */ - @JsonProperty(value = "properties.description") - private String description; - - /* - * The inputs for the Job. - */ - @JsonProperty(value = "properties.input") - private JobInput input; - - /* - * The UTC date and time when the customer has last updated the Job, in - * 'YYYY-MM-DDThh:mm:ssZ' format. - */ - @JsonProperty(value = "properties.lastModified", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModified; - - /* - * The outputs for the Job. - */ - @JsonProperty(value = "properties.outputs") - private List outputs; - - /* - * Priority with which the job should be processed. Higher priority jobs - * are processed before lower priority jobs. If not set, the default is - * normal. + * The resource properties. */ - @JsonProperty(value = "properties.priority") - private Priority priority; + @JsonProperty(value = "properties") + private JobProperties innerProperties; /* - * Customer provided key, value pairs that will be returned in Job and - * JobOutput state events. - */ - @JsonProperty(value = "properties.correlationData") - private Map correlationData; - - /* - * The UTC date and time at which this Job began processing. + * The system metadata relating to this resource. */ - @JsonProperty(value = "properties.startTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime startTime; + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; - /* - * The UTC date and time at which this Job finished processing. + /** + * Get the innerProperties property: The resource properties. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.endTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime endTime; + private JobProperties innerProperties() { + return this.innerProperties; + } /** * Get the systemData property: The system metadata relating to this resource. @@ -115,7 +63,7 @@ public SystemData systemData() { * @return the created value. */ public OffsetDateTime created() { - return this.created; + return this.innerProperties() == null ? null : this.innerProperties().created(); } /** @@ -124,7 +72,7 @@ public OffsetDateTime created() { * @return the state value. */ public JobState state() { - return this.state; + return this.innerProperties() == null ? null : this.innerProperties().state(); } /** @@ -133,7 +81,7 @@ public JobState state() { * @return the description value. */ public String description() { - return this.description; + return this.innerProperties() == null ? null : this.innerProperties().description(); } /** @@ -143,7 +91,10 @@ public String description() { * @return the JobInner object itself. */ public JobInner withDescription(String description) { - this.description = description; + if (this.innerProperties() == null) { + this.innerProperties = new JobProperties(); + } + this.innerProperties().withDescription(description); return this; } @@ -153,7 +104,7 @@ public JobInner withDescription(String description) { * @return the input value. */ public JobInput input() { - return this.input; + return this.innerProperties() == null ? null : this.innerProperties().input(); } /** @@ -163,7 +114,10 @@ public JobInput input() { * @return the JobInner object itself. */ public JobInner withInput(JobInput input) { - this.input = input; + if (this.innerProperties() == null) { + this.innerProperties = new JobProperties(); + } + this.innerProperties().withInput(input); return this; } @@ -174,7 +128,7 @@ public JobInner withInput(JobInput input) { * @return the lastModified value. */ public OffsetDateTime lastModified() { - return this.lastModified; + return this.innerProperties() == null ? null : this.innerProperties().lastModified(); } /** @@ -183,7 +137,7 @@ public OffsetDateTime lastModified() { * @return the outputs value. */ public List outputs() { - return this.outputs; + return this.innerProperties() == null ? null : this.innerProperties().outputs(); } /** @@ -193,7 +147,10 @@ public List outputs() { * @return the JobInner object itself. */ public JobInner withOutputs(List outputs) { - this.outputs = outputs; + if (this.innerProperties() == null) { + this.innerProperties = new JobProperties(); + } + this.innerProperties().withOutputs(outputs); return this; } @@ -204,7 +161,7 @@ public JobInner withOutputs(List outputs) { * @return the priority value. */ public Priority priority() { - return this.priority; + return this.innerProperties() == null ? null : this.innerProperties().priority(); } /** @@ -215,7 +172,10 @@ public Priority priority() { * @return the JobInner object itself. */ public JobInner withPriority(Priority priority) { - this.priority = priority; + if (this.innerProperties() == null) { + this.innerProperties = new JobProperties(); + } + this.innerProperties().withPriority(priority); return this; } @@ -226,7 +186,7 @@ public JobInner withPriority(Priority priority) { * @return the correlationData value. */ public Map correlationData() { - return this.correlationData; + return this.innerProperties() == null ? null : this.innerProperties().correlationData(); } /** @@ -237,7 +197,10 @@ public Map correlationData() { * @return the JobInner object itself. */ public JobInner withCorrelationData(Map correlationData) { - this.correlationData = correlationData; + if (this.innerProperties() == null) { + this.innerProperties = new JobProperties(); + } + this.innerProperties().withCorrelationData(correlationData); return this; } @@ -247,7 +210,7 @@ public JobInner withCorrelationData(Map correlationData) { * @return the startTime value. */ public OffsetDateTime startTime() { - return this.startTime; + return this.innerProperties() == null ? null : this.innerProperties().startTime(); } /** @@ -256,7 +219,7 @@ public OffsetDateTime startTime() { * @return the endTime value. */ public OffsetDateTime endTime() { - return this.endTime; + return this.innerProperties() == null ? null : this.innerProperties().endTime(); } /** @@ -265,11 +228,8 @@ public OffsetDateTime endTime() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (input() != null) { - input().validate(); - } - if (outputs() != null) { - outputs().forEach(e -> e.validate()); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/JobProperties.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/JobProperties.java new file mode 100644 index 000000000000..9f7274a45df8 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/JobProperties.java @@ -0,0 +1,263 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mediaservices.models.JobInput; +import com.azure.resourcemanager.mediaservices.models.JobOutput; +import com.azure.resourcemanager.mediaservices.models.JobState; +import com.azure.resourcemanager.mediaservices.models.Priority; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** Properties of the Job. */ +@Fluent +public final class JobProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(JobProperties.class); + + /* + * The UTC date and time when the customer has created the Job, in + * 'YYYY-MM-DDThh:mm:ssZ' format. + */ + @JsonProperty(value = "created", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime created; + + /* + * The current state of the job. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private JobState state; + + /* + * Optional customer supplied description of the Job. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The inputs for the Job. + */ + @JsonProperty(value = "input", required = true) + private JobInput input; + + /* + * The UTC date and time when the customer has last updated the Job, in + * 'YYYY-MM-DDThh:mm:ssZ' format. + */ + @JsonProperty(value = "lastModified", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastModified; + + /* + * The outputs for the Job. + */ + @JsonProperty(value = "outputs", required = true) + private List outputs; + + /* + * Priority with which the job should be processed. Higher priority jobs + * are processed before lower priority jobs. If not set, the default is + * normal. + */ + @JsonProperty(value = "priority") + private Priority priority; + + /* + * Customer provided key, value pairs that will be returned in Job and + * JobOutput state events. + */ + @JsonProperty(value = "correlationData") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map correlationData; + + /* + * The UTC date and time at which this Job began processing. + */ + @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime startTime; + + /* + * The UTC date and time at which this Job finished processing. + */ + @JsonProperty(value = "endTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime endTime; + + /** + * Get the created property: The UTC date and time when the customer has created the Job, in 'YYYY-MM-DDThh:mm:ssZ' + * format. + * + * @return the created value. + */ + public OffsetDateTime created() { + return this.created; + } + + /** + * Get the state property: The current state of the job. + * + * @return the state value. + */ + public JobState state() { + return this.state; + } + + /** + * Get the description property: Optional customer supplied description of the Job. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Optional customer supplied description of the Job. + * + * @param description the description value to set. + * @return the JobProperties object itself. + */ + public JobProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the input property: The inputs for the Job. + * + * @return the input value. + */ + public JobInput input() { + return this.input; + } + + /** + * Set the input property: The inputs for the Job. + * + * @param input the input value to set. + * @return the JobProperties object itself. + */ + public JobProperties withInput(JobInput input) { + this.input = input; + return this; + } + + /** + * Get the lastModified property: The UTC date and time when the customer has last updated the Job, in + * 'YYYY-MM-DDThh:mm:ssZ' format. + * + * @return the lastModified value. + */ + public OffsetDateTime lastModified() { + return this.lastModified; + } + + /** + * Get the outputs property: The outputs for the Job. + * + * @return the outputs value. + */ + public List outputs() { + return this.outputs; + } + + /** + * Set the outputs property: The outputs for the Job. + * + * @param outputs the outputs value to set. + * @return the JobProperties object itself. + */ + public JobProperties withOutputs(List outputs) { + this.outputs = outputs; + return this; + } + + /** + * Get the priority property: Priority with which the job should be processed. Higher priority jobs are processed + * before lower priority jobs. If not set, the default is normal. + * + * @return the priority value. + */ + public Priority priority() { + return this.priority; + } + + /** + * Set the priority property: Priority with which the job should be processed. Higher priority jobs are processed + * before lower priority jobs. If not set, the default is normal. + * + * @param priority the priority value to set. + * @return the JobProperties object itself. + */ + public JobProperties withPriority(Priority priority) { + this.priority = priority; + return this; + } + + /** + * Get the correlationData property: Customer provided key, value pairs that will be returned in Job and JobOutput + * state events. + * + * @return the correlationData value. + */ + public Map correlationData() { + return this.correlationData; + } + + /** + * Set the correlationData property: Customer provided key, value pairs that will be returned in Job and JobOutput + * state events. + * + * @param correlationData the correlationData value to set. + * @return the JobProperties object itself. + */ + public JobProperties withCorrelationData(Map correlationData) { + this.correlationData = correlationData; + return this; + } + + /** + * Get the startTime property: The UTC date and time at which this Job began processing. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The UTC date and time at which this Job finished processing. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (input() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property input in model JobProperties")); + } else { + input().validate(); + } + if (outputs() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property outputs in model JobProperties")); + } else { + outputs().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/LiveEventInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/LiveEventInner.java index e3bc48222309..b748d8f416fb 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/LiveEventInner.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/LiveEventInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; @@ -23,109 +22,30 @@ import java.util.Map; /** The live event. */ -@JsonFlatten @Fluent -public class LiveEventInner extends Resource { +public final class LiveEventInner extends Resource { @JsonIgnore private final ClientLogger logger = new ClientLogger(LiveEventInner.class); /* - * The system metadata relating to this resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /* - * A description for the live event. - */ - @JsonProperty(value = "properties.description") - private String description; - - /* - * Live event input settings. It defines how the live event receives input - * from a contribution encoder. - */ - @JsonProperty(value = "properties.input") - private LiveEventInput input; - - /* - * Live event preview settings. Preview allows live event producers to - * preview the live streaming content without creating any live output. - */ - @JsonProperty(value = "properties.preview") - private LiveEventPreview preview; - - /* - * Encoding settings for the live event. It configures whether a live - * encoder is used for the live event and settings for the live encoder if - * it is used. + * The live event properties. */ - @JsonProperty(value = "properties.encoding") - private LiveEventEncoding encoding; + @JsonProperty(value = "properties") + private LiveEventProperties innerProperties; /* - * Live transcription settings for the live event. See - * https://go.microsoft.com/fwlink/?linkid=2133742 for more information - * about the live transcription feature. - */ - @JsonProperty(value = "properties.transcriptions") - private List transcriptions; - - /* - * The provisioning state of the live event. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /* - * The resource state of the live event. See - * https://go.microsoft.com/fwlink/?linkid=2139012 for more information. - */ - @JsonProperty(value = "properties.resourceState", access = JsonProperty.Access.WRITE_ONLY) - private LiveEventResourceState resourceState; - - /* - * Live event cross site access policies. - */ - @JsonProperty(value = "properties.crossSiteAccessPolicies") - private CrossSiteAccessPolicies crossSiteAccessPolicies; - - /* - * Specifies whether a static hostname would be assigned to the live event - * preview and ingest endpoints. This value can only be updated if the live - * event is in Standby state - */ - @JsonProperty(value = "properties.useStaticHostname") - private Boolean useStaticHostname; - - /* - * When useStaticHostname is set to true, the hostnamePrefix specifies the - * first part of the hostname assigned to the live event preview and ingest - * endpoints. The final hostname would be a combination of this prefix, the - * media service account name and a short code for the Azure Media Services - * data center. - */ - @JsonProperty(value = "properties.hostnamePrefix") - private String hostnamePrefix; - - /* - * The options to use for the LiveEvent. This value is specified at - * creation time and cannot be updated. The valid values for the array - * entry values are 'Default' and 'LowLatency'. - */ - @JsonProperty(value = "properties.streamOptions") - private List streamOptions; - - /* - * The creation time for the live event + * The system metadata relating to this resource. */ - @JsonProperty(value = "properties.created", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime created; + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; - /* - * The last modified time of the live event. + /** + * Get the innerProperties property: The live event properties. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.lastModified", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModified; + private LiveEventProperties innerProperties() { + return this.innerProperties; + } /** * Get the systemData property: The system metadata relating to this resource. @@ -136,13 +56,27 @@ public SystemData systemData() { return this.systemData; } + /** {@inheritDoc} */ + @Override + public LiveEventInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public LiveEventInner withTags(Map tags) { + super.withTags(tags); + return this; + } + /** * Get the description property: A description for the live event. * * @return the description value. */ public String description() { - return this.description; + return this.innerProperties() == null ? null : this.innerProperties().description(); } /** @@ -152,7 +86,10 @@ public String description() { * @return the LiveEventInner object itself. */ public LiveEventInner withDescription(String description) { - this.description = description; + if (this.innerProperties() == null) { + this.innerProperties = new LiveEventProperties(); + } + this.innerProperties().withDescription(description); return this; } @@ -163,7 +100,7 @@ public LiveEventInner withDescription(String description) { * @return the input value. */ public LiveEventInput input() { - return this.input; + return this.innerProperties() == null ? null : this.innerProperties().input(); } /** @@ -174,7 +111,10 @@ public LiveEventInput input() { * @return the LiveEventInner object itself. */ public LiveEventInner withInput(LiveEventInput input) { - this.input = input; + if (this.innerProperties() == null) { + this.innerProperties = new LiveEventProperties(); + } + this.innerProperties().withInput(input); return this; } @@ -185,7 +125,7 @@ public LiveEventInner withInput(LiveEventInput input) { * @return the preview value. */ public LiveEventPreview preview() { - return this.preview; + return this.innerProperties() == null ? null : this.innerProperties().preview(); } /** @@ -196,7 +136,10 @@ public LiveEventPreview preview() { * @return the LiveEventInner object itself. */ public LiveEventInner withPreview(LiveEventPreview preview) { - this.preview = preview; + if (this.innerProperties() == null) { + this.innerProperties = new LiveEventProperties(); + } + this.innerProperties().withPreview(preview); return this; } @@ -207,7 +150,7 @@ public LiveEventInner withPreview(LiveEventPreview preview) { * @return the encoding value. */ public LiveEventEncoding encoding() { - return this.encoding; + return this.innerProperties() == null ? null : this.innerProperties().encoding(); } /** @@ -218,7 +161,10 @@ public LiveEventEncoding encoding() { * @return the LiveEventInner object itself. */ public LiveEventInner withEncoding(LiveEventEncoding encoding) { - this.encoding = encoding; + if (this.innerProperties() == null) { + this.innerProperties = new LiveEventProperties(); + } + this.innerProperties().withEncoding(encoding); return this; } @@ -229,7 +175,7 @@ public LiveEventInner withEncoding(LiveEventEncoding encoding) { * @return the transcriptions value. */ public List transcriptions() { - return this.transcriptions; + return this.innerProperties() == null ? null : this.innerProperties().transcriptions(); } /** @@ -240,7 +186,10 @@ public List transcriptions() { * @return the LiveEventInner object itself. */ public LiveEventInner withTranscriptions(List transcriptions) { - this.transcriptions = transcriptions; + if (this.innerProperties() == null) { + this.innerProperties = new LiveEventProperties(); + } + this.innerProperties().withTranscriptions(transcriptions); return this; } @@ -250,7 +199,7 @@ public LiveEventInner withTranscriptions(List transcript * @return the provisioningState value. */ public String provisioningState() { - return this.provisioningState; + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** @@ -260,7 +209,7 @@ public String provisioningState() { * @return the resourceState value. */ public LiveEventResourceState resourceState() { - return this.resourceState; + return this.innerProperties() == null ? null : this.innerProperties().resourceState(); } /** @@ -269,7 +218,7 @@ public LiveEventResourceState resourceState() { * @return the crossSiteAccessPolicies value. */ public CrossSiteAccessPolicies crossSiteAccessPolicies() { - return this.crossSiteAccessPolicies; + return this.innerProperties() == null ? null : this.innerProperties().crossSiteAccessPolicies(); } /** @@ -279,7 +228,10 @@ public CrossSiteAccessPolicies crossSiteAccessPolicies() { * @return the LiveEventInner object itself. */ public LiveEventInner withCrossSiteAccessPolicies(CrossSiteAccessPolicies crossSiteAccessPolicies) { - this.crossSiteAccessPolicies = crossSiteAccessPolicies; + if (this.innerProperties() == null) { + this.innerProperties = new LiveEventProperties(); + } + this.innerProperties().withCrossSiteAccessPolicies(crossSiteAccessPolicies); return this; } @@ -290,7 +242,7 @@ public LiveEventInner withCrossSiteAccessPolicies(CrossSiteAccessPolicies crossS * @return the useStaticHostname value. */ public Boolean useStaticHostname() { - return this.useStaticHostname; + return this.innerProperties() == null ? null : this.innerProperties().useStaticHostname(); } /** @@ -301,7 +253,10 @@ public Boolean useStaticHostname() { * @return the LiveEventInner object itself. */ public LiveEventInner withUseStaticHostname(Boolean useStaticHostname) { - this.useStaticHostname = useStaticHostname; + if (this.innerProperties() == null) { + this.innerProperties = new LiveEventProperties(); + } + this.innerProperties().withUseStaticHostname(useStaticHostname); return this; } @@ -314,7 +269,7 @@ public LiveEventInner withUseStaticHostname(Boolean useStaticHostname) { * @return the hostnamePrefix value. */ public String hostnamePrefix() { - return this.hostnamePrefix; + return this.innerProperties() == null ? null : this.innerProperties().hostnamePrefix(); } /** @@ -327,7 +282,10 @@ public String hostnamePrefix() { * @return the LiveEventInner object itself. */ public LiveEventInner withHostnamePrefix(String hostnamePrefix) { - this.hostnamePrefix = hostnamePrefix; + if (this.innerProperties() == null) { + this.innerProperties = new LiveEventProperties(); + } + this.innerProperties().withHostnamePrefix(hostnamePrefix); return this; } @@ -338,7 +296,7 @@ public LiveEventInner withHostnamePrefix(String hostnamePrefix) { * @return the streamOptions value. */ public List streamOptions() { - return this.streamOptions; + return this.innerProperties() == null ? null : this.innerProperties().streamOptions(); } /** @@ -349,7 +307,10 @@ public List streamOptions() { * @return the LiveEventInner object itself. */ public LiveEventInner withStreamOptions(List streamOptions) { - this.streamOptions = streamOptions; + if (this.innerProperties() == null) { + this.innerProperties = new LiveEventProperties(); + } + this.innerProperties().withStreamOptions(streamOptions); return this; } @@ -359,7 +320,7 @@ public LiveEventInner withStreamOptions(List streamOptions) { * @return the created value. */ public OffsetDateTime created() { - return this.created; + return this.innerProperties() == null ? null : this.innerProperties().created(); } /** @@ -368,21 +329,7 @@ public OffsetDateTime created() { * @return the lastModified value. */ public OffsetDateTime lastModified() { - return this.lastModified; - } - - /** {@inheritDoc} */ - @Override - public LiveEventInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public LiveEventInner withTags(Map tags) { - super.withTags(tags); - return this; + return this.innerProperties() == null ? null : this.innerProperties().lastModified(); } /** @@ -391,20 +338,8 @@ public LiveEventInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (input() != null) { - input().validate(); - } - if (preview() != null) { - preview().validate(); - } - if (encoding() != null) { - encoding().validate(); - } - if (transcriptions() != null) { - transcriptions().forEach(e -> e.validate()); - } - if (crossSiteAccessPolicies() != null) { - crossSiteAccessPolicies().validate(); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/LiveEventProperties.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/LiveEventProperties.java new file mode 100644 index 000000000000..0c6856d3d88a --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/LiveEventProperties.java @@ -0,0 +1,380 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mediaservices.models.CrossSiteAccessPolicies; +import com.azure.resourcemanager.mediaservices.models.LiveEventEncoding; +import com.azure.resourcemanager.mediaservices.models.LiveEventInput; +import com.azure.resourcemanager.mediaservices.models.LiveEventPreview; +import com.azure.resourcemanager.mediaservices.models.LiveEventResourceState; +import com.azure.resourcemanager.mediaservices.models.LiveEventTranscription; +import com.azure.resourcemanager.mediaservices.models.StreamOptionsFlag; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** The live event properties. */ +@Fluent +public final class LiveEventProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LiveEventProperties.class); + + /* + * A description for the live event. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Live event input settings. It defines how the live event receives input + * from a contribution encoder. + */ + @JsonProperty(value = "input", required = true) + private LiveEventInput input; + + /* + * Live event preview settings. Preview allows live event producers to + * preview the live streaming content without creating any live output. + */ + @JsonProperty(value = "preview") + private LiveEventPreview preview; + + /* + * Encoding settings for the live event. It configures whether a live + * encoder is used for the live event and settings for the live encoder if + * it is used. + */ + @JsonProperty(value = "encoding") + private LiveEventEncoding encoding; + + /* + * Live transcription settings for the live event. See + * https://go.microsoft.com/fwlink/?linkid=2133742 for more information + * about the live transcription feature. + */ + @JsonProperty(value = "transcriptions") + private List transcriptions; + + /* + * The provisioning state of the live event. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * The resource state of the live event. See + * https://go.microsoft.com/fwlink/?linkid=2139012 for more information. + */ + @JsonProperty(value = "resourceState", access = JsonProperty.Access.WRITE_ONLY) + private LiveEventResourceState resourceState; + + /* + * Live event cross site access policies. + */ + @JsonProperty(value = "crossSiteAccessPolicies") + private CrossSiteAccessPolicies crossSiteAccessPolicies; + + /* + * Specifies whether a static hostname would be assigned to the live event + * preview and ingest endpoints. This value can only be updated if the live + * event is in Standby state + */ + @JsonProperty(value = "useStaticHostname") + private Boolean useStaticHostname; + + /* + * When useStaticHostname is set to true, the hostnamePrefix specifies the + * first part of the hostname assigned to the live event preview and ingest + * endpoints. The final hostname would be a combination of this prefix, the + * media service account name and a short code for the Azure Media Services + * data center. + */ + @JsonProperty(value = "hostnamePrefix") + private String hostnamePrefix; + + /* + * The options to use for the LiveEvent. This value is specified at + * creation time and cannot be updated. The valid values for the array + * entry values are 'Default' and 'LowLatency'. + */ + @JsonProperty(value = "streamOptions") + private List streamOptions; + + /* + * The creation time for the live event + */ + @JsonProperty(value = "created", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime created; + + /* + * The last modified time of the live event. + */ + @JsonProperty(value = "lastModified", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastModified; + + /** + * Get the description property: A description for the live event. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: A description for the live event. + * + * @param description the description value to set. + * @return the LiveEventProperties object itself. + */ + public LiveEventProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the input property: Live event input settings. It defines how the live event receives input from a + * contribution encoder. + * + * @return the input value. + */ + public LiveEventInput input() { + return this.input; + } + + /** + * Set the input property: Live event input settings. It defines how the live event receives input from a + * contribution encoder. + * + * @param input the input value to set. + * @return the LiveEventProperties object itself. + */ + public LiveEventProperties withInput(LiveEventInput input) { + this.input = input; + return this; + } + + /** + * Get the preview property: Live event preview settings. Preview allows live event producers to preview the live + * streaming content without creating any live output. + * + * @return the preview value. + */ + public LiveEventPreview preview() { + return this.preview; + } + + /** + * Set the preview property: Live event preview settings. Preview allows live event producers to preview the live + * streaming content without creating any live output. + * + * @param preview the preview value to set. + * @return the LiveEventProperties object itself. + */ + public LiveEventProperties withPreview(LiveEventPreview preview) { + this.preview = preview; + return this; + } + + /** + * Get the encoding property: Encoding settings for the live event. It configures whether a live encoder is used for + * the live event and settings for the live encoder if it is used. + * + * @return the encoding value. + */ + public LiveEventEncoding encoding() { + return this.encoding; + } + + /** + * Set the encoding property: Encoding settings for the live event. It configures whether a live encoder is used for + * the live event and settings for the live encoder if it is used. + * + * @param encoding the encoding value to set. + * @return the LiveEventProperties object itself. + */ + public LiveEventProperties withEncoding(LiveEventEncoding encoding) { + this.encoding = encoding; + return this; + } + + /** + * Get the transcriptions property: Live transcription settings for the live event. See + * https://go.microsoft.com/fwlink/?linkid=2133742 for more information about the live transcription feature. + * + * @return the transcriptions value. + */ + public List transcriptions() { + return this.transcriptions; + } + + /** + * Set the transcriptions property: Live transcription settings for the live event. See + * https://go.microsoft.com/fwlink/?linkid=2133742 for more information about the live transcription feature. + * + * @param transcriptions the transcriptions value to set. + * @return the LiveEventProperties object itself. + */ + public LiveEventProperties withTranscriptions(List transcriptions) { + this.transcriptions = transcriptions; + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the live event. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the resourceState property: The resource state of the live event. See + * https://go.microsoft.com/fwlink/?linkid=2139012 for more information. + * + * @return the resourceState value. + */ + public LiveEventResourceState resourceState() { + return this.resourceState; + } + + /** + * Get the crossSiteAccessPolicies property: Live event cross site access policies. + * + * @return the crossSiteAccessPolicies value. + */ + public CrossSiteAccessPolicies crossSiteAccessPolicies() { + return this.crossSiteAccessPolicies; + } + + /** + * Set the crossSiteAccessPolicies property: Live event cross site access policies. + * + * @param crossSiteAccessPolicies the crossSiteAccessPolicies value to set. + * @return the LiveEventProperties object itself. + */ + public LiveEventProperties withCrossSiteAccessPolicies(CrossSiteAccessPolicies crossSiteAccessPolicies) { + this.crossSiteAccessPolicies = crossSiteAccessPolicies; + return this; + } + + /** + * Get the useStaticHostname property: Specifies whether a static hostname would be assigned to the live event + * preview and ingest endpoints. This value can only be updated if the live event is in Standby state. + * + * @return the useStaticHostname value. + */ + public Boolean useStaticHostname() { + return this.useStaticHostname; + } + + /** + * Set the useStaticHostname property: Specifies whether a static hostname would be assigned to the live event + * preview and ingest endpoints. This value can only be updated if the live event is in Standby state. + * + * @param useStaticHostname the useStaticHostname value to set. + * @return the LiveEventProperties object itself. + */ + public LiveEventProperties withUseStaticHostname(Boolean useStaticHostname) { + this.useStaticHostname = useStaticHostname; + return this; + } + + /** + * Get the hostnamePrefix property: When useStaticHostname is set to true, the hostnamePrefix specifies the first + * part of the hostname assigned to the live event preview and ingest endpoints. The final hostname would be a + * combination of this prefix, the media service account name and a short code for the Azure Media Services data + * center. + * + * @return the hostnamePrefix value. + */ + public String hostnamePrefix() { + return this.hostnamePrefix; + } + + /** + * Set the hostnamePrefix property: When useStaticHostname is set to true, the hostnamePrefix specifies the first + * part of the hostname assigned to the live event preview and ingest endpoints. The final hostname would be a + * combination of this prefix, the media service account name and a short code for the Azure Media Services data + * center. + * + * @param hostnamePrefix the hostnamePrefix value to set. + * @return the LiveEventProperties object itself. + */ + public LiveEventProperties withHostnamePrefix(String hostnamePrefix) { + this.hostnamePrefix = hostnamePrefix; + return this; + } + + /** + * Get the streamOptions property: The options to use for the LiveEvent. This value is specified at creation time + * and cannot be updated. The valid values for the array entry values are 'Default' and 'LowLatency'. + * + * @return the streamOptions value. + */ + public List streamOptions() { + return this.streamOptions; + } + + /** + * Set the streamOptions property: The options to use for the LiveEvent. This value is specified at creation time + * and cannot be updated. The valid values for the array entry values are 'Default' and 'LowLatency'. + * + * @param streamOptions the streamOptions value to set. + * @return the LiveEventProperties object itself. + */ + public LiveEventProperties withStreamOptions(List streamOptions) { + this.streamOptions = streamOptions; + return this; + } + + /** + * Get the created property: The creation time for the live event. + * + * @return the created value. + */ + public OffsetDateTime created() { + return this.created; + } + + /** + * Get the lastModified property: The last modified time of the live event. + * + * @return the lastModified value. + */ + public OffsetDateTime lastModified() { + return this.lastModified; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (input() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property input in model LiveEventProperties")); + } else { + input().validate(); + } + if (preview() != null) { + preview().validate(); + } + if (encoding() != null) { + encoding().validate(); + } + if (transcriptions() != null) { + transcriptions().forEach(e -> e.validate()); + } + if (crossSiteAccessPolicies() != null) { + crossSiteAccessPolicies().validate(); + } + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/LiveOutputInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/LiveOutputInner.java index 6d9be1687e7d..c0090e32b3dd 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/LiveOutputInner.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/LiveOutputInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; @@ -17,82 +16,30 @@ import java.time.OffsetDateTime; /** The Live Output. */ -@JsonFlatten @Fluent -public class LiveOutputInner extends ProxyResource { +public final class LiveOutputInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(LiveOutputInner.class); /* - * The system metadata relating to this resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /* - * The description of the live output. + * Live output properties. */ - @JsonProperty(value = "properties.description") - private String description; + @JsonProperty(value = "properties") + private LiveOutputProperties innerProperties; /* - * The asset that the live output will write to. - */ - @JsonProperty(value = "properties.assetName") - private String assetName; - - /* - * ISO 8601 time between 1 minute to 25 hours to indicate the maximum - * content length that can be archived in the asset for this live output. - * This also sets the maximum content length for the rewind window. For - * example, use PT1H30M to indicate 1 hour and 30 minutes of archive - * window. - */ - @JsonProperty(value = "properties.archiveWindowLength") - private Duration archiveWindowLength; - - /* - * The manifest file name. If not provided, the service will generate one - * automatically. - */ - @JsonProperty(value = "properties.manifestName") - private String manifestName; - - /* - * HTTP Live Streaming (HLS) packing setting for the live output. - */ - @JsonProperty(value = "properties.hls") - private Hls hls; - - /* - * The initial timestamp that the live output will start at, any content - * before this value will not be archived. - */ - @JsonProperty(value = "properties.outputSnapTime") - private Long outputSnapTime; - - /* - * The creation time the live output. - */ - @JsonProperty(value = "properties.created", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime created; - - /* - * The time the live output was last modified. - */ - @JsonProperty(value = "properties.lastModified", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModified; - - /* - * The provisioning state of the live output. + * The system metadata relating to this resource. */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; - /* - * The resource state of the live output. + /** + * Get the innerProperties property: Live output properties. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.resourceState", access = JsonProperty.Access.WRITE_ONLY) - private LiveOutputResourceState resourceState; + private LiveOutputProperties innerProperties() { + return this.innerProperties; + } /** * Get the systemData property: The system metadata relating to this resource. @@ -109,7 +56,7 @@ public SystemData systemData() { * @return the description value. */ public String description() { - return this.description; + return this.innerProperties() == null ? null : this.innerProperties().description(); } /** @@ -119,7 +66,10 @@ public String description() { * @return the LiveOutputInner object itself. */ public LiveOutputInner withDescription(String description) { - this.description = description; + if (this.innerProperties() == null) { + this.innerProperties = new LiveOutputProperties(); + } + this.innerProperties().withDescription(description); return this; } @@ -129,7 +79,7 @@ public LiveOutputInner withDescription(String description) { * @return the assetName value. */ public String assetName() { - return this.assetName; + return this.innerProperties() == null ? null : this.innerProperties().assetName(); } /** @@ -139,7 +89,10 @@ public String assetName() { * @return the LiveOutputInner object itself. */ public LiveOutputInner withAssetName(String assetName) { - this.assetName = assetName; + if (this.innerProperties() == null) { + this.innerProperties = new LiveOutputProperties(); + } + this.innerProperties().withAssetName(assetName); return this; } @@ -151,7 +104,7 @@ public LiveOutputInner withAssetName(String assetName) { * @return the archiveWindowLength value. */ public Duration archiveWindowLength() { - return this.archiveWindowLength; + return this.innerProperties() == null ? null : this.innerProperties().archiveWindowLength(); } /** @@ -163,7 +116,10 @@ public Duration archiveWindowLength() { * @return the LiveOutputInner object itself. */ public LiveOutputInner withArchiveWindowLength(Duration archiveWindowLength) { - this.archiveWindowLength = archiveWindowLength; + if (this.innerProperties() == null) { + this.innerProperties = new LiveOutputProperties(); + } + this.innerProperties().withArchiveWindowLength(archiveWindowLength); return this; } @@ -174,7 +130,7 @@ public LiveOutputInner withArchiveWindowLength(Duration archiveWindowLength) { * @return the manifestName value. */ public String manifestName() { - return this.manifestName; + return this.innerProperties() == null ? null : this.innerProperties().manifestName(); } /** @@ -185,7 +141,10 @@ public String manifestName() { * @return the LiveOutputInner object itself. */ public LiveOutputInner withManifestName(String manifestName) { - this.manifestName = manifestName; + if (this.innerProperties() == null) { + this.innerProperties = new LiveOutputProperties(); + } + this.innerProperties().withManifestName(manifestName); return this; } @@ -195,7 +154,7 @@ public LiveOutputInner withManifestName(String manifestName) { * @return the hls value. */ public Hls hls() { - return this.hls; + return this.innerProperties() == null ? null : this.innerProperties().hls(); } /** @@ -205,7 +164,10 @@ public Hls hls() { * @return the LiveOutputInner object itself. */ public LiveOutputInner withHls(Hls hls) { - this.hls = hls; + if (this.innerProperties() == null) { + this.innerProperties = new LiveOutputProperties(); + } + this.innerProperties().withHls(hls); return this; } @@ -216,7 +178,7 @@ public LiveOutputInner withHls(Hls hls) { * @return the outputSnapTime value. */ public Long outputSnapTime() { - return this.outputSnapTime; + return this.innerProperties() == null ? null : this.innerProperties().outputSnapTime(); } /** @@ -227,7 +189,10 @@ public Long outputSnapTime() { * @return the LiveOutputInner object itself. */ public LiveOutputInner withOutputSnapTime(Long outputSnapTime) { - this.outputSnapTime = outputSnapTime; + if (this.innerProperties() == null) { + this.innerProperties = new LiveOutputProperties(); + } + this.innerProperties().withOutputSnapTime(outputSnapTime); return this; } @@ -237,7 +202,7 @@ public LiveOutputInner withOutputSnapTime(Long outputSnapTime) { * @return the created value. */ public OffsetDateTime created() { - return this.created; + return this.innerProperties() == null ? null : this.innerProperties().created(); } /** @@ -246,7 +211,7 @@ public OffsetDateTime created() { * @return the lastModified value. */ public OffsetDateTime lastModified() { - return this.lastModified; + return this.innerProperties() == null ? null : this.innerProperties().lastModified(); } /** @@ -255,7 +220,7 @@ public OffsetDateTime lastModified() { * @return the provisioningState value. */ public String provisioningState() { - return this.provisioningState; + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** @@ -264,7 +229,7 @@ public String provisioningState() { * @return the resourceState value. */ public LiveOutputResourceState resourceState() { - return this.resourceState; + return this.innerProperties() == null ? null : this.innerProperties().resourceState(); } /** @@ -273,8 +238,8 @@ public LiveOutputResourceState resourceState() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (hls() != null) { - hls().validate(); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/LiveOutputProperties.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/LiveOutputProperties.java new file mode 100644 index 000000000000..c2ec09ca357a --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/LiveOutputProperties.java @@ -0,0 +1,272 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mediaservices.models.Hls; +import com.azure.resourcemanager.mediaservices.models.LiveOutputResourceState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.Duration; +import java.time.OffsetDateTime; + +/** The JSON object that contains the properties required to create a live output. */ +@Fluent +public final class LiveOutputProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LiveOutputProperties.class); + + /* + * The description of the live output. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The asset that the live output will write to. + */ + @JsonProperty(value = "assetName", required = true) + private String assetName; + + /* + * ISO 8601 time between 1 minute to 25 hours to indicate the maximum + * content length that can be archived in the asset for this live output. + * This also sets the maximum content length for the rewind window. For + * example, use PT1H30M to indicate 1 hour and 30 minutes of archive + * window. + */ + @JsonProperty(value = "archiveWindowLength", required = true) + private Duration archiveWindowLength; + + /* + * The manifest file name. If not provided, the service will generate one + * automatically. + */ + @JsonProperty(value = "manifestName") + private String manifestName; + + /* + * HTTP Live Streaming (HLS) packing setting for the live output. + */ + @JsonProperty(value = "hls") + private Hls hls; + + /* + * The initial timestamp that the live output will start at, any content + * before this value will not be archived. + */ + @JsonProperty(value = "outputSnapTime") + private Long outputSnapTime; + + /* + * The creation time the live output. + */ + @JsonProperty(value = "created", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime created; + + /* + * The time the live output was last modified. + */ + @JsonProperty(value = "lastModified", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastModified; + + /* + * The provisioning state of the live output. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * The resource state of the live output. + */ + @JsonProperty(value = "resourceState", access = JsonProperty.Access.WRITE_ONLY) + private LiveOutputResourceState resourceState; + + /** + * Get the description property: The description of the live output. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of the live output. + * + * @param description the description value to set. + * @return the LiveOutputProperties object itself. + */ + public LiveOutputProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the assetName property: The asset that the live output will write to. + * + * @return the assetName value. + */ + public String assetName() { + return this.assetName; + } + + /** + * Set the assetName property: The asset that the live output will write to. + * + * @param assetName the assetName value to set. + * @return the LiveOutputProperties object itself. + */ + public LiveOutputProperties withAssetName(String assetName) { + this.assetName = assetName; + return this; + } + + /** + * Get the archiveWindowLength property: ISO 8601 time between 1 minute to 25 hours to indicate the maximum content + * length that can be archived in the asset for this live output. This also sets the maximum content length for the + * rewind window. For example, use PT1H30M to indicate 1 hour and 30 minutes of archive window. + * + * @return the archiveWindowLength value. + */ + public Duration archiveWindowLength() { + return this.archiveWindowLength; + } + + /** + * Set the archiveWindowLength property: ISO 8601 time between 1 minute to 25 hours to indicate the maximum content + * length that can be archived in the asset for this live output. This also sets the maximum content length for the + * rewind window. For example, use PT1H30M to indicate 1 hour and 30 minutes of archive window. + * + * @param archiveWindowLength the archiveWindowLength value to set. + * @return the LiveOutputProperties object itself. + */ + public LiveOutputProperties withArchiveWindowLength(Duration archiveWindowLength) { + this.archiveWindowLength = archiveWindowLength; + return this; + } + + /** + * Get the manifestName property: The manifest file name. If not provided, the service will generate one + * automatically. + * + * @return the manifestName value. + */ + public String manifestName() { + return this.manifestName; + } + + /** + * Set the manifestName property: The manifest file name. If not provided, the service will generate one + * automatically. + * + * @param manifestName the manifestName value to set. + * @return the LiveOutputProperties object itself. + */ + public LiveOutputProperties withManifestName(String manifestName) { + this.manifestName = manifestName; + return this; + } + + /** + * Get the hls property: HTTP Live Streaming (HLS) packing setting for the live output. + * + * @return the hls value. + */ + public Hls hls() { + return this.hls; + } + + /** + * Set the hls property: HTTP Live Streaming (HLS) packing setting for the live output. + * + * @param hls the hls value to set. + * @return the LiveOutputProperties object itself. + */ + public LiveOutputProperties withHls(Hls hls) { + this.hls = hls; + return this; + } + + /** + * Get the outputSnapTime property: The initial timestamp that the live output will start at, any content before + * this value will not be archived. + * + * @return the outputSnapTime value. + */ + public Long outputSnapTime() { + return this.outputSnapTime; + } + + /** + * Set the outputSnapTime property: The initial timestamp that the live output will start at, any content before + * this value will not be archived. + * + * @param outputSnapTime the outputSnapTime value to set. + * @return the LiveOutputProperties object itself. + */ + public LiveOutputProperties withOutputSnapTime(Long outputSnapTime) { + this.outputSnapTime = outputSnapTime; + return this; + } + + /** + * Get the created property: The creation time the live output. + * + * @return the created value. + */ + public OffsetDateTime created() { + return this.created; + } + + /** + * Get the lastModified property: The time the live output was last modified. + * + * @return the lastModified value. + */ + public OffsetDateTime lastModified() { + return this.lastModified; + } + + /** + * Get the provisioningState property: The provisioning state of the live output. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the resourceState property: The resource state of the live output. + * + * @return the resourceState value. + */ + public LiveOutputResourceState resourceState() { + return this.resourceState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (assetName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property assetName in model LiveOutputProperties")); + } + if (archiveWindowLength() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property archiveWindowLength in model LiveOutputProperties")); + } + if (hls() != null) { + hls().validate(); + } + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/MediaFilterProperties.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/MediaFilterProperties.java new file mode 100644 index 000000000000..7533aad64c20 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/MediaFilterProperties.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mediaservices.models.FilterTrackSelection; +import com.azure.resourcemanager.mediaservices.models.FirstQuality; +import com.azure.resourcemanager.mediaservices.models.PresentationTimeRange; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The Media Filter properties. */ +@Fluent +public final class MediaFilterProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MediaFilterProperties.class); + + /* + * The presentation time range. + */ + @JsonProperty(value = "presentationTimeRange") + private PresentationTimeRange presentationTimeRange; + + /* + * The first quality. + */ + @JsonProperty(value = "firstQuality") + private FirstQuality firstQuality; + + /* + * The tracks selection conditions. + */ + @JsonProperty(value = "tracks") + private List tracks; + + /** + * Get the presentationTimeRange property: The presentation time range. + * + * @return the presentationTimeRange value. + */ + public PresentationTimeRange presentationTimeRange() { + return this.presentationTimeRange; + } + + /** + * Set the presentationTimeRange property: The presentation time range. + * + * @param presentationTimeRange the presentationTimeRange value to set. + * @return the MediaFilterProperties object itself. + */ + public MediaFilterProperties withPresentationTimeRange(PresentationTimeRange presentationTimeRange) { + this.presentationTimeRange = presentationTimeRange; + return this; + } + + /** + * Get the firstQuality property: The first quality. + * + * @return the firstQuality value. + */ + public FirstQuality firstQuality() { + return this.firstQuality; + } + + /** + * Set the firstQuality property: The first quality. + * + * @param firstQuality the firstQuality value to set. + * @return the MediaFilterProperties object itself. + */ + public MediaFilterProperties withFirstQuality(FirstQuality firstQuality) { + this.firstQuality = firstQuality; + return this; + } + + /** + * Get the tracks property: The tracks selection conditions. + * + * @return the tracks value. + */ + public List tracks() { + return this.tracks; + } + + /** + * Set the tracks property: The tracks selection conditions. + * + * @param tracks the tracks value to set. + * @return the MediaFilterProperties object itself. + */ + public MediaFilterProperties withTracks(List tracks) { + this.tracks = tracks; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (presentationTimeRange() != null) { + presentationTimeRange().validate(); + } + if (firstQuality() != null) { + firstQuality().validate(); + } + if (tracks() != null) { + tracks().forEach(e -> e.validate()); + } + } +} 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 b5d2c57d143b..636a0294d442 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 @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; @@ -22,11 +21,16 @@ import java.util.UUID; /** A Media Services account. */ -@JsonFlatten @Fluent -public class MediaServiceInner extends Resource { +public final class MediaServiceInner extends Resource { @JsonIgnore private final ClientLogger logger = new ClientLogger(MediaServiceInner.class); + /* + * The resource properties. + */ + @JsonProperty(value = "properties") + private MediaServiceProperties innerProperties; + /* * The Managed Identity for the Media Services account. */ @@ -39,42 +43,14 @@ public class MediaServiceInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /* - * The Media Services account ID. - */ - @JsonProperty(value = "properties.mediaServiceId", access = JsonProperty.Access.WRITE_ONLY) - private UUID mediaServiceId; - - /* - * The storage accounts for this resource. - */ - @JsonProperty(value = "properties.storageAccounts") - private List storageAccounts; - - /* - * The storageAuthentication property. - */ - @JsonProperty(value = "properties.storageAuthentication") - private StorageAuthentication storageAuthentication; - - /* - * The account encryption properties. - */ - @JsonProperty(value = "properties.encryption") - private AccountEncryption encryption; - - /* - * The Key Delivery properties for Media Services account. - */ - @JsonProperty(value = "properties.keyDelivery") - private KeyDelivery keyDelivery; - - /* - * Whether or not public network access is allowed for resources under the - * Media Services account. + /** + * Get the innerProperties property: The resource properties. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.publicNetworkAccess") - private PublicNetworkAccess publicNetworkAccess; + private MediaServiceProperties innerProperties() { + return this.innerProperties; + } /** * Get the identity property: The Managed Identity for the Media Services account. @@ -105,13 +81,27 @@ public SystemData systemData() { return this.systemData; } + /** {@inheritDoc} */ + @Override + public MediaServiceInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public MediaServiceInner withTags(Map tags) { + super.withTags(tags); + return this; + } + /** * Get the mediaServiceId property: The Media Services account ID. * * @return the mediaServiceId value. */ public UUID mediaServiceId() { - return this.mediaServiceId; + return this.innerProperties() == null ? null : this.innerProperties().mediaServiceId(); } /** @@ -120,7 +110,7 @@ public UUID mediaServiceId() { * @return the storageAccounts value. */ public List storageAccounts() { - return this.storageAccounts; + return this.innerProperties() == null ? null : this.innerProperties().storageAccounts(); } /** @@ -130,7 +120,10 @@ public List storageAccounts() { * @return the MediaServiceInner object itself. */ public MediaServiceInner withStorageAccounts(List storageAccounts) { - this.storageAccounts = storageAccounts; + if (this.innerProperties() == null) { + this.innerProperties = new MediaServiceProperties(); + } + this.innerProperties().withStorageAccounts(storageAccounts); return this; } @@ -140,7 +133,7 @@ public MediaServiceInner withStorageAccounts(List storageAccount * @return the storageAuthentication value. */ public StorageAuthentication storageAuthentication() { - return this.storageAuthentication; + return this.innerProperties() == null ? null : this.innerProperties().storageAuthentication(); } /** @@ -150,7 +143,10 @@ public StorageAuthentication storageAuthentication() { * @return the MediaServiceInner object itself. */ public MediaServiceInner withStorageAuthentication(StorageAuthentication storageAuthentication) { - this.storageAuthentication = storageAuthentication; + if (this.innerProperties() == null) { + this.innerProperties = new MediaServiceProperties(); + } + this.innerProperties().withStorageAuthentication(storageAuthentication); return this; } @@ -160,7 +156,7 @@ public MediaServiceInner withStorageAuthentication(StorageAuthentication storage * @return the encryption value. */ public AccountEncryption encryption() { - return this.encryption; + return this.innerProperties() == null ? null : this.innerProperties().encryption(); } /** @@ -170,7 +166,10 @@ public AccountEncryption encryption() { * @return the MediaServiceInner object itself. */ public MediaServiceInner withEncryption(AccountEncryption encryption) { - this.encryption = encryption; + if (this.innerProperties() == null) { + this.innerProperties = new MediaServiceProperties(); + } + this.innerProperties().withEncryption(encryption); return this; } @@ -180,7 +179,7 @@ public MediaServiceInner withEncryption(AccountEncryption encryption) { * @return the keyDelivery value. */ public KeyDelivery keyDelivery() { - return this.keyDelivery; + return this.innerProperties() == null ? null : this.innerProperties().keyDelivery(); } /** @@ -190,7 +189,10 @@ public KeyDelivery keyDelivery() { * @return the MediaServiceInner object itself. */ public MediaServiceInner withKeyDelivery(KeyDelivery keyDelivery) { - this.keyDelivery = keyDelivery; + if (this.innerProperties() == null) { + this.innerProperties = new MediaServiceProperties(); + } + this.innerProperties().withKeyDelivery(keyDelivery); return this; } @@ -201,7 +203,7 @@ public MediaServiceInner withKeyDelivery(KeyDelivery keyDelivery) { * @return the publicNetworkAccess value. */ public PublicNetworkAccess publicNetworkAccess() { - return this.publicNetworkAccess; + return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); } /** @@ -212,21 +214,10 @@ public PublicNetworkAccess publicNetworkAccess() { * @return the MediaServiceInner object itself. */ public MediaServiceInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; - return this; - } - - /** {@inheritDoc} */ - @Override - public MediaServiceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public MediaServiceInner withTags(Map tags) { - super.withTags(tags); + if (this.innerProperties() == null) { + this.innerProperties = new MediaServiceProperties(); + } + this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); return this; } @@ -236,17 +227,11 @@ public MediaServiceInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } if (identity() != null) { identity().validate(); } - if (storageAccounts() != null) { - storageAccounts().forEach(e -> e.validate()); - } - if (encryption() != null) { - encryption().validate(); - } - if (keyDelivery() != null) { - keyDelivery().validate(); - } } } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/MediaServiceProperties.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/MediaServiceProperties.java new file mode 100644 index 000000000000..b80e4738794e --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/MediaServiceProperties.java @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mediaservices.models.AccountEncryption; +import com.azure.resourcemanager.mediaservices.models.KeyDelivery; +import com.azure.resourcemanager.mediaservices.models.PublicNetworkAccess; +import com.azure.resourcemanager.mediaservices.models.StorageAccount; +import com.azure.resourcemanager.mediaservices.models.StorageAuthentication; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.UUID; + +/** Properties of the Media Services account. */ +@Fluent +public final class MediaServiceProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MediaServiceProperties.class); + + /* + * The Media Services account ID. + */ + @JsonProperty(value = "mediaServiceId", access = JsonProperty.Access.WRITE_ONLY) + private UUID mediaServiceId; + + /* + * The storage accounts for this resource. + */ + @JsonProperty(value = "storageAccounts") + private List storageAccounts; + + /* + * The storageAuthentication property. + */ + @JsonProperty(value = "storageAuthentication") + private StorageAuthentication storageAuthentication; + + /* + * The account encryption properties. + */ + @JsonProperty(value = "encryption") + private AccountEncryption encryption; + + /* + * The Key Delivery properties for Media Services account. + */ + @JsonProperty(value = "keyDelivery") + private KeyDelivery keyDelivery; + + /* + * Whether or not public network access is allowed for resources under the + * Media Services account. + */ + @JsonProperty(value = "publicNetworkAccess") + private PublicNetworkAccess publicNetworkAccess; + + /** + * Get the mediaServiceId property: The Media Services account ID. + * + * @return the mediaServiceId value. + */ + public UUID mediaServiceId() { + return this.mediaServiceId; + } + + /** + * Get the storageAccounts property: The storage accounts for this resource. + * + * @return the storageAccounts value. + */ + public List storageAccounts() { + return this.storageAccounts; + } + + /** + * Set the storageAccounts property: The storage accounts for this resource. + * + * @param storageAccounts the storageAccounts value to set. + * @return the MediaServiceProperties object itself. + */ + public MediaServiceProperties withStorageAccounts(List storageAccounts) { + this.storageAccounts = storageAccounts; + return this; + } + + /** + * Get the storageAuthentication property: The storageAuthentication property. + * + * @return the storageAuthentication value. + */ + public StorageAuthentication storageAuthentication() { + return this.storageAuthentication; + } + + /** + * Set the storageAuthentication property: The storageAuthentication property. + * + * @param storageAuthentication the storageAuthentication value to set. + * @return the MediaServiceProperties object itself. + */ + public MediaServiceProperties withStorageAuthentication(StorageAuthentication storageAuthentication) { + this.storageAuthentication = storageAuthentication; + return this; + } + + /** + * Get the encryption property: The account encryption properties. + * + * @return the encryption value. + */ + public AccountEncryption encryption() { + return this.encryption; + } + + /** + * Set the encryption property: The account encryption properties. + * + * @param encryption the encryption value to set. + * @return the MediaServiceProperties object itself. + */ + public MediaServiceProperties withEncryption(AccountEncryption encryption) { + this.encryption = encryption; + return this; + } + + /** + * Get the keyDelivery property: The Key Delivery properties for Media Services account. + * + * @return the keyDelivery value. + */ + public KeyDelivery keyDelivery() { + return this.keyDelivery; + } + + /** + * Set the keyDelivery property: The Key Delivery properties for Media Services account. + * + * @param keyDelivery the keyDelivery value to set. + * @return the MediaServiceProperties object itself. + */ + public MediaServiceProperties withKeyDelivery(KeyDelivery keyDelivery) { + this.keyDelivery = keyDelivery; + return this; + } + + /** + * Get the publicNetworkAccess property: Whether or not public network access is allowed for resources under the + * Media Services account. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccess publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: Whether or not public network access is allowed for resources under the + * Media Services account. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the MediaServiceProperties object itself. + */ + public MediaServiceProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (storageAccounts() != null) { + storageAccounts().forEach(e -> e.validate()); + } + if (encryption() != null) { + encryption().validate(); + } + if (keyDelivery() != null) { + keyDelivery().validate(); + } + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/PrivateEndpointConnectionInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/PrivateEndpointConnectionInner.java index 68ba355b5d53..33940041a962 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/PrivateEndpointConnectionInner.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/PrivateEndpointConnectionInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mediaservices.models.PrivateEndpoint; @@ -15,29 +14,24 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** The Private Endpoint Connection resource. */ -@JsonFlatten @Fluent -public class PrivateEndpointConnectionInner extends ProxyResource { +public final class PrivateEndpointConnectionInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionInner.class); /* - * The resource of private end point. + * Resource properties. */ - @JsonProperty(value = "properties.privateEndpoint") - private PrivateEndpoint privateEndpoint; + @JsonProperty(value = "properties") + private PrivateEndpointConnectionProperties innerProperties; - /* - * A collection of information about the state of the connection between - * service consumer and provider. - */ - @JsonProperty(value = "properties.privateLinkServiceConnectionState") - private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; - - /* - * The provisioning state of the private endpoint connection resource. + /** + * Get the innerProperties property: Resource properties. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private PrivateEndpointConnectionProvisioningState provisioningState; + private PrivateEndpointConnectionProperties innerProperties() { + return this.innerProperties; + } /** * Get the privateEndpoint property: The resource of private end point. @@ -45,7 +39,7 @@ public class PrivateEndpointConnectionInner extends ProxyResource { * @return the privateEndpoint value. */ public PrivateEndpoint privateEndpoint() { - return this.privateEndpoint; + return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint(); } /** @@ -55,7 +49,10 @@ public PrivateEndpoint privateEndpoint() { * @return the PrivateEndpointConnectionInner object itself. */ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - this.privateEndpoint = privateEndpoint; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateEndpointConnectionProperties(); + } + this.innerProperties().withPrivateEndpoint(privateEndpoint); return this; } @@ -66,7 +63,7 @@ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privat * @return the privateLinkServiceConnectionState value. */ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { - return this.privateLinkServiceConnectionState; + return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState(); } /** @@ -78,7 +75,10 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { */ public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState( PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateEndpointConnectionProperties(); + } + this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); return this; } @@ -88,7 +88,7 @@ public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState( * @return the provisioningState value. */ public PrivateEndpointConnectionProvisioningState provisioningState() { - return this.provisioningState; + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** @@ -97,11 +97,8 @@ public PrivateEndpointConnectionProvisioningState provisioningState() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (privateEndpoint() != null) { - privateEndpoint().validate(); - } - if (privateLinkServiceConnectionState() != null) { - privateLinkServiceConnectionState().validate(); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/PrivateEndpointConnectionProperties.java new file mode 100644 index 000000000000..c8e5241f3960 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/PrivateEndpointConnectionProperties.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mediaservices.models.PrivateEndpoint; +import com.azure.resourcemanager.mediaservices.models.PrivateEndpointConnectionProvisioningState; +import com.azure.resourcemanager.mediaservices.models.PrivateLinkServiceConnectionState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of the PrivateEndpointConnectProperties. */ +@Fluent +public final class PrivateEndpointConnectionProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionProperties.class); + + /* + * The resource of private end point. + */ + @JsonProperty(value = "privateEndpoint") + private PrivateEndpoint privateEndpoint; + + /* + * A collection of information about the state of the connection between + * service consumer and provider. + */ + @JsonProperty(value = "privateLinkServiceConnectionState", required = true) + private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + + /* + * The provisioning state of the private endpoint connection resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private PrivateEndpointConnectionProvisioningState provisioningState; + + /** + * Get the privateEndpoint property: The resource of private end point. + * + * @return the privateEndpoint value. + */ + public PrivateEndpoint privateEndpoint() { + return this.privateEndpoint; + } + + /** + * Set the privateEndpoint property: The resource of private end point. + * + * @param privateEndpoint the privateEndpoint value to set. + * @return the PrivateEndpointConnectionProperties object itself. + */ + public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + this.privateEndpoint = privateEndpoint; + return this; + } + + /** + * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @return the privateLinkServiceConnectionState value. + */ + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.privateLinkServiceConnectionState; + } + + /** + * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. + * @return the PrivateEndpointConnectionProperties object itself. + */ + public PrivateEndpointConnectionProperties withPrivateLinkServiceConnectionState( + PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the private endpoint connection resource. + * + * @return the provisioningState value. + */ + public PrivateEndpointConnectionProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (privateEndpoint() != null) { + privateEndpoint().validate(); + } + if (privateLinkServiceConnectionState() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property privateLinkServiceConnectionState in model" + + " PrivateEndpointConnectionProperties")); + } else { + privateLinkServiceConnectionState().validate(); + } + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/PrivateLinkResourceInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/PrivateLinkResourceInner.java index b4eb20d28ea3..0b0621273aa4 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/PrivateLinkResourceInner.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/PrivateLinkResourceInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -13,28 +12,24 @@ import java.util.List; /** A private link resource. */ -@JsonFlatten @Fluent -public class PrivateLinkResourceInner extends ProxyResource { +public final class PrivateLinkResourceInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceInner.class); /* - * The private link resource group id. + * Resource properties. */ - @JsonProperty(value = "properties.groupId", access = JsonProperty.Access.WRITE_ONLY) - private String groupId; + @JsonProperty(value = "properties") + private PrivateLinkResourceProperties innerProperties; - /* - * The private link resource required member names. - */ - @JsonProperty(value = "properties.requiredMembers", access = JsonProperty.Access.WRITE_ONLY) - private List requiredMembers; - - /* - * The private link resource Private link DNS zone name. + /** + * Get the innerProperties property: Resource properties. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.requiredZoneNames") - private List requiredZoneNames; + private PrivateLinkResourceProperties innerProperties() { + return this.innerProperties; + } /** * Get the groupId property: The private link resource group id. @@ -42,7 +37,7 @@ public class PrivateLinkResourceInner extends ProxyResource { * @return the groupId value. */ public String groupId() { - return this.groupId; + return this.innerProperties() == null ? null : this.innerProperties().groupId(); } /** @@ -51,7 +46,7 @@ public String groupId() { * @return the requiredMembers value. */ public List requiredMembers() { - return this.requiredMembers; + return this.innerProperties() == null ? null : this.innerProperties().requiredMembers(); } /** @@ -60,7 +55,7 @@ public List requiredMembers() { * @return the requiredZoneNames value. */ public List requiredZoneNames() { - return this.requiredZoneNames; + return this.innerProperties() == null ? null : this.innerProperties().requiredZoneNames(); } /** @@ -70,7 +65,10 @@ public List requiredZoneNames() { * @return the PrivateLinkResourceInner object itself. */ public PrivateLinkResourceInner withRequiredZoneNames(List requiredZoneNames) { - this.requiredZoneNames = requiredZoneNames; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateLinkResourceProperties(); + } + this.innerProperties().withRequiredZoneNames(requiredZoneNames); return this; } @@ -80,5 +78,8 @@ public PrivateLinkResourceInner withRequiredZoneNames(List requiredZoneN * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/PrivateLinkResourceProperties.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/PrivateLinkResourceProperties.java new file mode 100644 index 000000000000..7a6259bb3108 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/PrivateLinkResourceProperties.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Properties of a private link resource. */ +@Fluent +public final class PrivateLinkResourceProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceProperties.class); + + /* + * The private link resource group id. + */ + @JsonProperty(value = "groupId", access = JsonProperty.Access.WRITE_ONLY) + private String groupId; + + /* + * The private link resource required member names. + */ + @JsonProperty(value = "requiredMembers", access = JsonProperty.Access.WRITE_ONLY) + private List requiredMembers; + + /* + * The private link resource Private link DNS zone name. + */ + @JsonProperty(value = "requiredZoneNames") + private List requiredZoneNames; + + /** + * Get the groupId property: The private link resource group id. + * + * @return the groupId value. + */ + public String groupId() { + return this.groupId; + } + + /** + * Get the requiredMembers property: The private link resource required member names. + * + * @return the requiredMembers value. + */ + public List requiredMembers() { + return this.requiredMembers; + } + + /** + * Get the requiredZoneNames property: The private link resource Private link DNS zone name. + * + * @return the requiredZoneNames value. + */ + public List requiredZoneNames() { + return this.requiredZoneNames; + } + + /** + * Set the requiredZoneNames property: The private link resource Private link DNS zone name. + * + * @param requiredZoneNames the requiredZoneNames value to set. + * @return the PrivateLinkResourceProperties object itself. + */ + public PrivateLinkResourceProperties withRequiredZoneNames(List requiredZoneNames) { + this.requiredZoneNames = requiredZoneNames; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/StreamingEndpointInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/StreamingEndpointInner.java index 09d3a0129715..4437871f3841 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/StreamingEndpointInner.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/StreamingEndpointInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; @@ -19,112 +18,30 @@ import java.util.Map; /** The streaming endpoint. */ -@JsonFlatten @Fluent -public class StreamingEndpointInner extends Resource { +public final class StreamingEndpointInner extends Resource { @JsonIgnore private final ClientLogger logger = new ClientLogger(StreamingEndpointInner.class); /* - * The system metadata relating to this resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /* - * The streaming endpoint description. - */ - @JsonProperty(value = "properties.description") - private String description; - - /* - * The number of scale units. Use the Scale operation to adjust this value. - */ - @JsonProperty(value = "properties.scaleUnits") - private Integer scaleUnits; - - /* - * This feature is deprecated, do not set a value for this property. - */ - @JsonProperty(value = "properties.availabilitySetName") - private String availabilitySetName; - - /* - * The access control definition of the streaming endpoint. - */ - @JsonProperty(value = "properties.accessControl") - private StreamingEndpointAccessControl accessControl; - - /* - * Max cache age - */ - @JsonProperty(value = "properties.maxCacheAge") - private Long maxCacheAge; - - /* - * The custom host names of the streaming endpoint - */ - @JsonProperty(value = "properties.customHostNames") - private List customHostNames; - - /* - * The streaming endpoint host name. - */ - @JsonProperty(value = "properties.hostName", access = JsonProperty.Access.WRITE_ONLY) - private String hostname; - - /* - * The CDN enabled flag. - */ - @JsonProperty(value = "properties.cdnEnabled") - private Boolean cdnEnabled; - - /* - * The CDN provider name. - */ - @JsonProperty(value = "properties.cdnProvider") - private String cdnProvider; - - /* - * The CDN profile name. + * The streaming endpoint properties. */ - @JsonProperty(value = "properties.cdnProfile") - private String cdnProfile; + @JsonProperty(value = "properties") + private StreamingEndpointProperties innerProperties; /* - * The provisioning state of the streaming endpoint. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /* - * The resource state of the streaming endpoint. - */ - @JsonProperty(value = "properties.resourceState", access = JsonProperty.Access.WRITE_ONLY) - private StreamingEndpointResourceState resourceState; - - /* - * The streaming endpoint access policies. - */ - @JsonProperty(value = "properties.crossSiteAccessPolicies") - private CrossSiteAccessPolicies crossSiteAccessPolicies; - - /* - * The free trial expiration time. - */ - @JsonProperty(value = "properties.freeTrialEndTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime freeTrialEndTime; - - /* - * The exact time the streaming endpoint was created. + * The system metadata relating to this resource. */ - @JsonProperty(value = "properties.created", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime created; + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; - /* - * The exact time the streaming endpoint was last modified. + /** + * Get the innerProperties property: The streaming endpoint properties. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.lastModified", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModified; + private StreamingEndpointProperties innerProperties() { + return this.innerProperties; + } /** * Get the systemData property: The system metadata relating to this resource. @@ -135,13 +52,27 @@ public SystemData systemData() { return this.systemData; } + /** {@inheritDoc} */ + @Override + public StreamingEndpointInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public StreamingEndpointInner withTags(Map tags) { + super.withTags(tags); + return this; + } + /** * Get the description property: The streaming endpoint description. * * @return the description value. */ public String description() { - return this.description; + return this.innerProperties() == null ? null : this.innerProperties().description(); } /** @@ -151,7 +82,10 @@ public String description() { * @return the StreamingEndpointInner object itself. */ public StreamingEndpointInner withDescription(String description) { - this.description = description; + if (this.innerProperties() == null) { + this.innerProperties = new StreamingEndpointProperties(); + } + this.innerProperties().withDescription(description); return this; } @@ -161,7 +95,7 @@ public StreamingEndpointInner withDescription(String description) { * @return the scaleUnits value. */ public Integer scaleUnits() { - return this.scaleUnits; + return this.innerProperties() == null ? null : this.innerProperties().scaleUnits(); } /** @@ -171,7 +105,10 @@ public Integer scaleUnits() { * @return the StreamingEndpointInner object itself. */ public StreamingEndpointInner withScaleUnits(Integer scaleUnits) { - this.scaleUnits = scaleUnits; + if (this.innerProperties() == null) { + this.innerProperties = new StreamingEndpointProperties(); + } + this.innerProperties().withScaleUnits(scaleUnits); return this; } @@ -181,7 +118,7 @@ public StreamingEndpointInner withScaleUnits(Integer scaleUnits) { * @return the availabilitySetName value. */ public String availabilitySetName() { - return this.availabilitySetName; + return this.innerProperties() == null ? null : this.innerProperties().availabilitySetName(); } /** @@ -191,7 +128,10 @@ public String availabilitySetName() { * @return the StreamingEndpointInner object itself. */ public StreamingEndpointInner withAvailabilitySetName(String availabilitySetName) { - this.availabilitySetName = availabilitySetName; + if (this.innerProperties() == null) { + this.innerProperties = new StreamingEndpointProperties(); + } + this.innerProperties().withAvailabilitySetName(availabilitySetName); return this; } @@ -201,7 +141,7 @@ public StreamingEndpointInner withAvailabilitySetName(String availabilitySetName * @return the accessControl value. */ public StreamingEndpointAccessControl accessControl() { - return this.accessControl; + return this.innerProperties() == null ? null : this.innerProperties().accessControl(); } /** @@ -211,7 +151,10 @@ public StreamingEndpointAccessControl accessControl() { * @return the StreamingEndpointInner object itself. */ public StreamingEndpointInner withAccessControl(StreamingEndpointAccessControl accessControl) { - this.accessControl = accessControl; + if (this.innerProperties() == null) { + this.innerProperties = new StreamingEndpointProperties(); + } + this.innerProperties().withAccessControl(accessControl); return this; } @@ -221,7 +164,7 @@ public StreamingEndpointInner withAccessControl(StreamingEndpointAccessControl a * @return the maxCacheAge value. */ public Long maxCacheAge() { - return this.maxCacheAge; + return this.innerProperties() == null ? null : this.innerProperties().maxCacheAge(); } /** @@ -231,7 +174,10 @@ public Long maxCacheAge() { * @return the StreamingEndpointInner object itself. */ public StreamingEndpointInner withMaxCacheAge(Long maxCacheAge) { - this.maxCacheAge = maxCacheAge; + if (this.innerProperties() == null) { + this.innerProperties = new StreamingEndpointProperties(); + } + this.innerProperties().withMaxCacheAge(maxCacheAge); return this; } @@ -241,7 +187,7 @@ public StreamingEndpointInner withMaxCacheAge(Long maxCacheAge) { * @return the customHostNames value. */ public List customHostNames() { - return this.customHostNames; + return this.innerProperties() == null ? null : this.innerProperties().customHostNames(); } /** @@ -251,7 +197,10 @@ public List customHostNames() { * @return the StreamingEndpointInner object itself. */ public StreamingEndpointInner withCustomHostNames(List customHostNames) { - this.customHostNames = customHostNames; + if (this.innerProperties() == null) { + this.innerProperties = new StreamingEndpointProperties(); + } + this.innerProperties().withCustomHostNames(customHostNames); return this; } @@ -261,7 +210,7 @@ public StreamingEndpointInner withCustomHostNames(List customHostNames) * @return the hostname value. */ public String hostname() { - return this.hostname; + return this.innerProperties() == null ? null : this.innerProperties().hostname(); } /** @@ -270,7 +219,7 @@ public String hostname() { * @return the cdnEnabled value. */ public Boolean cdnEnabled() { - return this.cdnEnabled; + return this.innerProperties() == null ? null : this.innerProperties().cdnEnabled(); } /** @@ -280,7 +229,10 @@ public Boolean cdnEnabled() { * @return the StreamingEndpointInner object itself. */ public StreamingEndpointInner withCdnEnabled(Boolean cdnEnabled) { - this.cdnEnabled = cdnEnabled; + if (this.innerProperties() == null) { + this.innerProperties = new StreamingEndpointProperties(); + } + this.innerProperties().withCdnEnabled(cdnEnabled); return this; } @@ -290,7 +242,7 @@ public StreamingEndpointInner withCdnEnabled(Boolean cdnEnabled) { * @return the cdnProvider value. */ public String cdnProvider() { - return this.cdnProvider; + return this.innerProperties() == null ? null : this.innerProperties().cdnProvider(); } /** @@ -300,7 +252,10 @@ public String cdnProvider() { * @return the StreamingEndpointInner object itself. */ public StreamingEndpointInner withCdnProvider(String cdnProvider) { - this.cdnProvider = cdnProvider; + if (this.innerProperties() == null) { + this.innerProperties = new StreamingEndpointProperties(); + } + this.innerProperties().withCdnProvider(cdnProvider); return this; } @@ -310,7 +265,7 @@ public StreamingEndpointInner withCdnProvider(String cdnProvider) { * @return the cdnProfile value. */ public String cdnProfile() { - return this.cdnProfile; + return this.innerProperties() == null ? null : this.innerProperties().cdnProfile(); } /** @@ -320,7 +275,10 @@ public String cdnProfile() { * @return the StreamingEndpointInner object itself. */ public StreamingEndpointInner withCdnProfile(String cdnProfile) { - this.cdnProfile = cdnProfile; + if (this.innerProperties() == null) { + this.innerProperties = new StreamingEndpointProperties(); + } + this.innerProperties().withCdnProfile(cdnProfile); return this; } @@ -330,7 +288,7 @@ public StreamingEndpointInner withCdnProfile(String cdnProfile) { * @return the provisioningState value. */ public String provisioningState() { - return this.provisioningState; + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** @@ -339,7 +297,7 @@ public String provisioningState() { * @return the resourceState value. */ public StreamingEndpointResourceState resourceState() { - return this.resourceState; + return this.innerProperties() == null ? null : this.innerProperties().resourceState(); } /** @@ -348,7 +306,7 @@ public StreamingEndpointResourceState resourceState() { * @return the crossSiteAccessPolicies value. */ public CrossSiteAccessPolicies crossSiteAccessPolicies() { - return this.crossSiteAccessPolicies; + return this.innerProperties() == null ? null : this.innerProperties().crossSiteAccessPolicies(); } /** @@ -358,7 +316,10 @@ public CrossSiteAccessPolicies crossSiteAccessPolicies() { * @return the StreamingEndpointInner object itself. */ public StreamingEndpointInner withCrossSiteAccessPolicies(CrossSiteAccessPolicies crossSiteAccessPolicies) { - this.crossSiteAccessPolicies = crossSiteAccessPolicies; + if (this.innerProperties() == null) { + this.innerProperties = new StreamingEndpointProperties(); + } + this.innerProperties().withCrossSiteAccessPolicies(crossSiteAccessPolicies); return this; } @@ -368,7 +329,7 @@ public StreamingEndpointInner withCrossSiteAccessPolicies(CrossSiteAccessPolicie * @return the freeTrialEndTime value. */ public OffsetDateTime freeTrialEndTime() { - return this.freeTrialEndTime; + return this.innerProperties() == null ? null : this.innerProperties().freeTrialEndTime(); } /** @@ -377,7 +338,7 @@ public OffsetDateTime freeTrialEndTime() { * @return the created value. */ public OffsetDateTime created() { - return this.created; + return this.innerProperties() == null ? null : this.innerProperties().created(); } /** @@ -386,21 +347,7 @@ public OffsetDateTime created() { * @return the lastModified value. */ public OffsetDateTime lastModified() { - return this.lastModified; - } - - /** {@inheritDoc} */ - @Override - public StreamingEndpointInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public StreamingEndpointInner withTags(Map tags) { - super.withTags(tags); - return this; + return this.innerProperties() == null ? null : this.innerProperties().lastModified(); } /** @@ -409,11 +356,8 @@ public StreamingEndpointInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (accessControl() != null) { - accessControl().validate(); - } - if (crossSiteAccessPolicies() != null) { - crossSiteAccessPolicies().validate(); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/StreamingEndpointProperties.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/StreamingEndpointProperties.java new file mode 100644 index 000000000000..8bb1c90e4f19 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/StreamingEndpointProperties.java @@ -0,0 +1,385 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mediaservices.models.CrossSiteAccessPolicies; +import com.azure.resourcemanager.mediaservices.models.StreamingEndpointAccessControl; +import com.azure.resourcemanager.mediaservices.models.StreamingEndpointResourceState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** The streaming endpoint properties. */ +@Fluent +public final class StreamingEndpointProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StreamingEndpointProperties.class); + + /* + * The streaming endpoint description. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The number of scale units. Use the Scale operation to adjust this value. + */ + @JsonProperty(value = "scaleUnits", required = true) + private int scaleUnits; + + /* + * This feature is deprecated, do not set a value for this property. + */ + @JsonProperty(value = "availabilitySetName") + private String availabilitySetName; + + /* + * The access control definition of the streaming endpoint. + */ + @JsonProperty(value = "accessControl") + private StreamingEndpointAccessControl accessControl; + + /* + * Max cache age + */ + @JsonProperty(value = "maxCacheAge") + private Long maxCacheAge; + + /* + * The custom host names of the streaming endpoint + */ + @JsonProperty(value = "customHostNames") + private List customHostNames; + + /* + * The streaming endpoint host name. + */ + @JsonProperty(value = "hostName", access = JsonProperty.Access.WRITE_ONLY) + private String hostname; + + /* + * The CDN enabled flag. + */ + @JsonProperty(value = "cdnEnabled") + private Boolean cdnEnabled; + + /* + * The CDN provider name. + */ + @JsonProperty(value = "cdnProvider") + private String cdnProvider; + + /* + * The CDN profile name. + */ + @JsonProperty(value = "cdnProfile") + private String cdnProfile; + + /* + * The provisioning state of the streaming endpoint. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * The resource state of the streaming endpoint. + */ + @JsonProperty(value = "resourceState", access = JsonProperty.Access.WRITE_ONLY) + private StreamingEndpointResourceState resourceState; + + /* + * The streaming endpoint access policies. + */ + @JsonProperty(value = "crossSiteAccessPolicies") + private CrossSiteAccessPolicies crossSiteAccessPolicies; + + /* + * The free trial expiration time. + */ + @JsonProperty(value = "freeTrialEndTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime freeTrialEndTime; + + /* + * The exact time the streaming endpoint was created. + */ + @JsonProperty(value = "created", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime created; + + /* + * The exact time the streaming endpoint was last modified. + */ + @JsonProperty(value = "lastModified", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastModified; + + /** + * Get the description property: The streaming endpoint description. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The streaming endpoint description. + * + * @param description the description value to set. + * @return the StreamingEndpointProperties object itself. + */ + public StreamingEndpointProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the scaleUnits property: The number of scale units. Use the Scale operation to adjust this value. + * + * @return the scaleUnits value. + */ + public int scaleUnits() { + return this.scaleUnits; + } + + /** + * Set the scaleUnits property: The number of scale units. Use the Scale operation to adjust this value. + * + * @param scaleUnits the scaleUnits value to set. + * @return the StreamingEndpointProperties object itself. + */ + public StreamingEndpointProperties withScaleUnits(int scaleUnits) { + this.scaleUnits = scaleUnits; + return this; + } + + /** + * Get the availabilitySetName property: This feature is deprecated, do not set a value for this property. + * + * @return the availabilitySetName value. + */ + public String availabilitySetName() { + return this.availabilitySetName; + } + + /** + * Set the availabilitySetName property: This feature is deprecated, do not set a value for this property. + * + * @param availabilitySetName the availabilitySetName value to set. + * @return the StreamingEndpointProperties object itself. + */ + public StreamingEndpointProperties withAvailabilitySetName(String availabilitySetName) { + this.availabilitySetName = availabilitySetName; + return this; + } + + /** + * Get the accessControl property: The access control definition of the streaming endpoint. + * + * @return the accessControl value. + */ + public StreamingEndpointAccessControl accessControl() { + return this.accessControl; + } + + /** + * Set the accessControl property: The access control definition of the streaming endpoint. + * + * @param accessControl the accessControl value to set. + * @return the StreamingEndpointProperties object itself. + */ + public StreamingEndpointProperties withAccessControl(StreamingEndpointAccessControl accessControl) { + this.accessControl = accessControl; + return this; + } + + /** + * Get the maxCacheAge property: Max cache age. + * + * @return the maxCacheAge value. + */ + public Long maxCacheAge() { + return this.maxCacheAge; + } + + /** + * Set the maxCacheAge property: Max cache age. + * + * @param maxCacheAge the maxCacheAge value to set. + * @return the StreamingEndpointProperties object itself. + */ + public StreamingEndpointProperties withMaxCacheAge(Long maxCacheAge) { + this.maxCacheAge = maxCacheAge; + return this; + } + + /** + * Get the customHostNames property: The custom host names of the streaming endpoint. + * + * @return the customHostNames value. + */ + public List customHostNames() { + return this.customHostNames; + } + + /** + * Set the customHostNames property: The custom host names of the streaming endpoint. + * + * @param customHostNames the customHostNames value to set. + * @return the StreamingEndpointProperties object itself. + */ + public StreamingEndpointProperties withCustomHostNames(List customHostNames) { + this.customHostNames = customHostNames; + return this; + } + + /** + * Get the hostname property: The streaming endpoint host name. + * + * @return the hostname value. + */ + public String hostname() { + return this.hostname; + } + + /** + * Get the cdnEnabled property: The CDN enabled flag. + * + * @return the cdnEnabled value. + */ + public Boolean cdnEnabled() { + return this.cdnEnabled; + } + + /** + * Set the cdnEnabled property: The CDN enabled flag. + * + * @param cdnEnabled the cdnEnabled value to set. + * @return the StreamingEndpointProperties object itself. + */ + public StreamingEndpointProperties withCdnEnabled(Boolean cdnEnabled) { + this.cdnEnabled = cdnEnabled; + return this; + } + + /** + * Get the cdnProvider property: The CDN provider name. + * + * @return the cdnProvider value. + */ + public String cdnProvider() { + return this.cdnProvider; + } + + /** + * Set the cdnProvider property: The CDN provider name. + * + * @param cdnProvider the cdnProvider value to set. + * @return the StreamingEndpointProperties object itself. + */ + public StreamingEndpointProperties withCdnProvider(String cdnProvider) { + this.cdnProvider = cdnProvider; + return this; + } + + /** + * Get the cdnProfile property: The CDN profile name. + * + * @return the cdnProfile value. + */ + public String cdnProfile() { + return this.cdnProfile; + } + + /** + * Set the cdnProfile property: The CDN profile name. + * + * @param cdnProfile the cdnProfile value to set. + * @return the StreamingEndpointProperties object itself. + */ + public StreamingEndpointProperties withCdnProfile(String cdnProfile) { + this.cdnProfile = cdnProfile; + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the streaming endpoint. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the resourceState property: The resource state of the streaming endpoint. + * + * @return the resourceState value. + */ + public StreamingEndpointResourceState resourceState() { + return this.resourceState; + } + + /** + * Get the crossSiteAccessPolicies property: The streaming endpoint access policies. + * + * @return the crossSiteAccessPolicies value. + */ + public CrossSiteAccessPolicies crossSiteAccessPolicies() { + return this.crossSiteAccessPolicies; + } + + /** + * Set the crossSiteAccessPolicies property: The streaming endpoint access policies. + * + * @param crossSiteAccessPolicies the crossSiteAccessPolicies value to set. + * @return the StreamingEndpointProperties object itself. + */ + public StreamingEndpointProperties withCrossSiteAccessPolicies(CrossSiteAccessPolicies crossSiteAccessPolicies) { + this.crossSiteAccessPolicies = crossSiteAccessPolicies; + return this; + } + + /** + * Get the freeTrialEndTime property: The free trial expiration time. + * + * @return the freeTrialEndTime value. + */ + public OffsetDateTime freeTrialEndTime() { + return this.freeTrialEndTime; + } + + /** + * Get the created property: The exact time the streaming endpoint was created. + * + * @return the created value. + */ + public OffsetDateTime created() { + return this.created; + } + + /** + * Get the lastModified property: The exact time the streaming endpoint was last modified. + * + * @return the lastModified value. + */ + public OffsetDateTime lastModified() { + return this.lastModified; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (accessControl() != null) { + accessControl().validate(); + } + if (crossSiteAccessPolicies() != null) { + crossSiteAccessPolicies().validate(); + } + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/StreamingLocatorInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/StreamingLocatorInner.java index 683a4fb4c226..7f10434080ca 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/StreamingLocatorInner.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/StreamingLocatorInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; @@ -17,82 +16,30 @@ import java.util.UUID; /** A Streaming Locator resource. */ -@JsonFlatten @Fluent -public class StreamingLocatorInner extends ProxyResource { +public final class StreamingLocatorInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(StreamingLocatorInner.class); /* - * The system metadata relating to this resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /* - * Asset Name - */ - @JsonProperty(value = "properties.assetName") - private String assetName; - - /* - * The creation time of the Streaming Locator. - */ - @JsonProperty(value = "properties.created", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime created; - - /* - * The start time of the Streaming Locator. - */ - @JsonProperty(value = "properties.startTime") - private OffsetDateTime startTime; - - /* - * The end time of the Streaming Locator. + * Properties of the Streaming Locator. */ - @JsonProperty(value = "properties.endTime") - private OffsetDateTime endTime; + @JsonProperty(value = "properties") + private StreamingLocatorProperties innerProperties; /* - * The StreamingLocatorId of the Streaming Locator. - */ - @JsonProperty(value = "properties.streamingLocatorId") - private UUID streamingLocatorId; - - /* - * Name of the Streaming Policy used by this Streaming Locator. Either - * specify the name of Streaming Policy you created or use one of the - * predefined Streaming Policies. The predefined Streaming Policies - * available are: 'Predefined_DownloadOnly', - * 'Predefined_ClearStreamingOnly', 'Predefined_DownloadAndClearStreaming', - * 'Predefined_ClearKey', 'Predefined_MultiDrmCencStreaming' and - * 'Predefined_MultiDrmStreaming' - */ - @JsonProperty(value = "properties.streamingPolicyName") - private String streamingPolicyName; - - /* - * Name of the default ContentKeyPolicy used by this Streaming Locator. - */ - @JsonProperty(value = "properties.defaultContentKeyPolicyName") - private String defaultContentKeyPolicyName; - - /* - * The ContentKeys used by this Streaming Locator. - */ - @JsonProperty(value = "properties.contentKeys") - private List contentKeys; - - /* - * Alternative Media ID of this Streaming Locator + * The system metadata relating to this resource. */ - @JsonProperty(value = "properties.alternativeMediaId") - private String alternativeMediaId; + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; - /* - * A list of asset or account filters which apply to this streaming locator + /** + * Get the innerProperties property: Properties of the Streaming Locator. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.filters") - private List filters; + private StreamingLocatorProperties innerProperties() { + return this.innerProperties; + } /** * Get the systemData property: The system metadata relating to this resource. @@ -109,7 +56,7 @@ public SystemData systemData() { * @return the assetName value. */ public String assetName() { - return this.assetName; + return this.innerProperties() == null ? null : this.innerProperties().assetName(); } /** @@ -119,7 +66,10 @@ public String assetName() { * @return the StreamingLocatorInner object itself. */ public StreamingLocatorInner withAssetName(String assetName) { - this.assetName = assetName; + if (this.innerProperties() == null) { + this.innerProperties = new StreamingLocatorProperties(); + } + this.innerProperties().withAssetName(assetName); return this; } @@ -129,7 +79,7 @@ public StreamingLocatorInner withAssetName(String assetName) { * @return the created value. */ public OffsetDateTime created() { - return this.created; + return this.innerProperties() == null ? null : this.innerProperties().created(); } /** @@ -138,7 +88,7 @@ public OffsetDateTime created() { * @return the startTime value. */ public OffsetDateTime startTime() { - return this.startTime; + return this.innerProperties() == null ? null : this.innerProperties().startTime(); } /** @@ -148,7 +98,10 @@ public OffsetDateTime startTime() { * @return the StreamingLocatorInner object itself. */ public StreamingLocatorInner withStartTime(OffsetDateTime startTime) { - this.startTime = startTime; + if (this.innerProperties() == null) { + this.innerProperties = new StreamingLocatorProperties(); + } + this.innerProperties().withStartTime(startTime); return this; } @@ -158,7 +111,7 @@ public StreamingLocatorInner withStartTime(OffsetDateTime startTime) { * @return the endTime value. */ public OffsetDateTime endTime() { - return this.endTime; + return this.innerProperties() == null ? null : this.innerProperties().endTime(); } /** @@ -168,7 +121,10 @@ public OffsetDateTime endTime() { * @return the StreamingLocatorInner object itself. */ public StreamingLocatorInner withEndTime(OffsetDateTime endTime) { - this.endTime = endTime; + if (this.innerProperties() == null) { + this.innerProperties = new StreamingLocatorProperties(); + } + this.innerProperties().withEndTime(endTime); return this; } @@ -178,7 +134,7 @@ public StreamingLocatorInner withEndTime(OffsetDateTime endTime) { * @return the streamingLocatorId value. */ public UUID streamingLocatorId() { - return this.streamingLocatorId; + return this.innerProperties() == null ? null : this.innerProperties().streamingLocatorId(); } /** @@ -188,7 +144,10 @@ public UUID streamingLocatorId() { * @return the StreamingLocatorInner object itself. */ public StreamingLocatorInner withStreamingLocatorId(UUID streamingLocatorId) { - this.streamingLocatorId = streamingLocatorId; + if (this.innerProperties() == null) { + this.innerProperties = new StreamingLocatorProperties(); + } + this.innerProperties().withStreamingLocatorId(streamingLocatorId); return this; } @@ -202,7 +161,7 @@ public StreamingLocatorInner withStreamingLocatorId(UUID streamingLocatorId) { * @return the streamingPolicyName value. */ public String streamingPolicyName() { - return this.streamingPolicyName; + return this.innerProperties() == null ? null : this.innerProperties().streamingPolicyName(); } /** @@ -216,7 +175,10 @@ public String streamingPolicyName() { * @return the StreamingLocatorInner object itself. */ public StreamingLocatorInner withStreamingPolicyName(String streamingPolicyName) { - this.streamingPolicyName = streamingPolicyName; + if (this.innerProperties() == null) { + this.innerProperties = new StreamingLocatorProperties(); + } + this.innerProperties().withStreamingPolicyName(streamingPolicyName); return this; } @@ -227,7 +189,7 @@ public StreamingLocatorInner withStreamingPolicyName(String streamingPolicyName) * @return the defaultContentKeyPolicyName value. */ public String defaultContentKeyPolicyName() { - return this.defaultContentKeyPolicyName; + return this.innerProperties() == null ? null : this.innerProperties().defaultContentKeyPolicyName(); } /** @@ -238,7 +200,10 @@ public String defaultContentKeyPolicyName() { * @return the StreamingLocatorInner object itself. */ public StreamingLocatorInner withDefaultContentKeyPolicyName(String defaultContentKeyPolicyName) { - this.defaultContentKeyPolicyName = defaultContentKeyPolicyName; + if (this.innerProperties() == null) { + this.innerProperties = new StreamingLocatorProperties(); + } + this.innerProperties().withDefaultContentKeyPolicyName(defaultContentKeyPolicyName); return this; } @@ -248,7 +213,7 @@ public StreamingLocatorInner withDefaultContentKeyPolicyName(String defaultConte * @return the contentKeys value. */ public List contentKeys() { - return this.contentKeys; + return this.innerProperties() == null ? null : this.innerProperties().contentKeys(); } /** @@ -258,7 +223,10 @@ public List contentKeys() { * @return the StreamingLocatorInner object itself. */ public StreamingLocatorInner withContentKeys(List contentKeys) { - this.contentKeys = contentKeys; + if (this.innerProperties() == null) { + this.innerProperties = new StreamingLocatorProperties(); + } + this.innerProperties().withContentKeys(contentKeys); return this; } @@ -268,7 +236,7 @@ public StreamingLocatorInner withContentKeys(List co * @return the alternativeMediaId value. */ public String alternativeMediaId() { - return this.alternativeMediaId; + return this.innerProperties() == null ? null : this.innerProperties().alternativeMediaId(); } /** @@ -278,7 +246,10 @@ public String alternativeMediaId() { * @return the StreamingLocatorInner object itself. */ public StreamingLocatorInner withAlternativeMediaId(String alternativeMediaId) { - this.alternativeMediaId = alternativeMediaId; + if (this.innerProperties() == null) { + this.innerProperties = new StreamingLocatorProperties(); + } + this.innerProperties().withAlternativeMediaId(alternativeMediaId); return this; } @@ -288,7 +259,7 @@ public StreamingLocatorInner withAlternativeMediaId(String alternativeMediaId) { * @return the filters value. */ public List filters() { - return this.filters; + return this.innerProperties() == null ? null : this.innerProperties().filters(); } /** @@ -298,7 +269,10 @@ public List filters() { * @return the StreamingLocatorInner object itself. */ public StreamingLocatorInner withFilters(List filters) { - this.filters = filters; + if (this.innerProperties() == null) { + this.innerProperties = new StreamingLocatorProperties(); + } + this.innerProperties().withFilters(filters); return this; } @@ -308,8 +282,8 @@ public StreamingLocatorInner withFilters(List filters) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (contentKeys() != null) { - contentKeys().forEach(e -> e.validate()); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/StreamingLocatorProperties.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/StreamingLocatorProperties.java new file mode 100644 index 000000000000..8bb98a994783 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/StreamingLocatorProperties.java @@ -0,0 +1,308 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mediaservices.models.StreamingLocatorContentKey; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.UUID; + +/** Properties of the Streaming Locator. */ +@Fluent +public final class StreamingLocatorProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StreamingLocatorProperties.class); + + /* + * Asset Name + */ + @JsonProperty(value = "assetName", required = true) + private String assetName; + + /* + * The creation time of the Streaming Locator. + */ + @JsonProperty(value = "created", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime created; + + /* + * The start time of the Streaming Locator. + */ + @JsonProperty(value = "startTime") + private OffsetDateTime startTime; + + /* + * The end time of the Streaming Locator. + */ + @JsonProperty(value = "endTime") + private OffsetDateTime endTime; + + /* + * The StreamingLocatorId of the Streaming Locator. + */ + @JsonProperty(value = "streamingLocatorId") + private UUID streamingLocatorId; + + /* + * Name of the Streaming Policy used by this Streaming Locator. Either + * specify the name of Streaming Policy you created or use one of the + * predefined Streaming Policies. The predefined Streaming Policies + * available are: 'Predefined_DownloadOnly', + * 'Predefined_ClearStreamingOnly', 'Predefined_DownloadAndClearStreaming', + * 'Predefined_ClearKey', 'Predefined_MultiDrmCencStreaming' and + * 'Predefined_MultiDrmStreaming' + */ + @JsonProperty(value = "streamingPolicyName", required = true) + private String streamingPolicyName; + + /* + * Name of the default ContentKeyPolicy used by this Streaming Locator. + */ + @JsonProperty(value = "defaultContentKeyPolicyName") + private String defaultContentKeyPolicyName; + + /* + * The ContentKeys used by this Streaming Locator. + */ + @JsonProperty(value = "contentKeys") + private List contentKeys; + + /* + * Alternative Media ID of this Streaming Locator + */ + @JsonProperty(value = "alternativeMediaId") + private String alternativeMediaId; + + /* + * A list of asset or account filters which apply to this streaming locator + */ + @JsonProperty(value = "filters") + private List filters; + + /** + * Get the assetName property: Asset Name. + * + * @return the assetName value. + */ + public String assetName() { + return this.assetName; + } + + /** + * Set the assetName property: Asset Name. + * + * @param assetName the assetName value to set. + * @return the StreamingLocatorProperties object itself. + */ + public StreamingLocatorProperties withAssetName(String assetName) { + this.assetName = assetName; + return this; + } + + /** + * Get the created property: The creation time of the Streaming Locator. + * + * @return the created value. + */ + public OffsetDateTime created() { + return this.created; + } + + /** + * Get the startTime property: The start time of the Streaming Locator. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Set the startTime property: The start time of the Streaming Locator. + * + * @param startTime the startTime value to set. + * @return the StreamingLocatorProperties object itself. + */ + public StreamingLocatorProperties withStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime property: The end time of the Streaming Locator. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Set the endTime property: The end time of the Streaming Locator. + * + * @param endTime the endTime value to set. + * @return the StreamingLocatorProperties object itself. + */ + public StreamingLocatorProperties withEndTime(OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the streamingLocatorId property: The StreamingLocatorId of the Streaming Locator. + * + * @return the streamingLocatorId value. + */ + public UUID streamingLocatorId() { + return this.streamingLocatorId; + } + + /** + * Set the streamingLocatorId property: The StreamingLocatorId of the Streaming Locator. + * + * @param streamingLocatorId the streamingLocatorId value to set. + * @return the StreamingLocatorProperties object itself. + */ + public StreamingLocatorProperties withStreamingLocatorId(UUID streamingLocatorId) { + this.streamingLocatorId = streamingLocatorId; + return this; + } + + /** + * Get the streamingPolicyName property: Name of the Streaming Policy used by this Streaming Locator. Either specify + * the name of Streaming Policy you created or use one of the predefined Streaming Policies. The predefined + * Streaming Policies available are: 'Predefined_DownloadOnly', 'Predefined_ClearStreamingOnly', + * 'Predefined_DownloadAndClearStreaming', 'Predefined_ClearKey', 'Predefined_MultiDrmCencStreaming' and + * 'Predefined_MultiDrmStreaming'. + * + * @return the streamingPolicyName value. + */ + public String streamingPolicyName() { + return this.streamingPolicyName; + } + + /** + * Set the streamingPolicyName property: Name of the Streaming Policy used by this Streaming Locator. Either specify + * the name of Streaming Policy you created or use one of the predefined Streaming Policies. The predefined + * Streaming Policies available are: 'Predefined_DownloadOnly', 'Predefined_ClearStreamingOnly', + * 'Predefined_DownloadAndClearStreaming', 'Predefined_ClearKey', 'Predefined_MultiDrmCencStreaming' and + * 'Predefined_MultiDrmStreaming'. + * + * @param streamingPolicyName the streamingPolicyName value to set. + * @return the StreamingLocatorProperties object itself. + */ + public StreamingLocatorProperties withStreamingPolicyName(String streamingPolicyName) { + this.streamingPolicyName = streamingPolicyName; + return this; + } + + /** + * Get the defaultContentKeyPolicyName property: Name of the default ContentKeyPolicy used by this Streaming + * Locator. + * + * @return the defaultContentKeyPolicyName value. + */ + public String defaultContentKeyPolicyName() { + return this.defaultContentKeyPolicyName; + } + + /** + * Set the defaultContentKeyPolicyName property: Name of the default ContentKeyPolicy used by this Streaming + * Locator. + * + * @param defaultContentKeyPolicyName the defaultContentKeyPolicyName value to set. + * @return the StreamingLocatorProperties object itself. + */ + public StreamingLocatorProperties withDefaultContentKeyPolicyName(String defaultContentKeyPolicyName) { + this.defaultContentKeyPolicyName = defaultContentKeyPolicyName; + return this; + } + + /** + * Get the contentKeys property: The ContentKeys used by this Streaming Locator. + * + * @return the contentKeys value. + */ + public List contentKeys() { + return this.contentKeys; + } + + /** + * Set the contentKeys property: The ContentKeys used by this Streaming Locator. + * + * @param contentKeys the contentKeys value to set. + * @return the StreamingLocatorProperties object itself. + */ + public StreamingLocatorProperties withContentKeys(List contentKeys) { + this.contentKeys = contentKeys; + return this; + } + + /** + * Get the alternativeMediaId property: Alternative Media ID of this Streaming Locator. + * + * @return the alternativeMediaId value. + */ + public String alternativeMediaId() { + return this.alternativeMediaId; + } + + /** + * Set the alternativeMediaId property: Alternative Media ID of this Streaming Locator. + * + * @param alternativeMediaId the alternativeMediaId value to set. + * @return the StreamingLocatorProperties object itself. + */ + public StreamingLocatorProperties withAlternativeMediaId(String alternativeMediaId) { + this.alternativeMediaId = alternativeMediaId; + return this; + } + + /** + * Get the filters property: A list of asset or account filters which apply to this streaming locator. + * + * @return the filters value. + */ + public List filters() { + return this.filters; + } + + /** + * Set the filters property: A list of asset or account filters which apply to this streaming locator. + * + * @param filters the filters value to set. + * @return the StreamingLocatorProperties object itself. + */ + public StreamingLocatorProperties withFilters(List filters) { + this.filters = filters; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (assetName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property assetName in model StreamingLocatorProperties")); + } + if (streamingPolicyName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property streamingPolicyName in model StreamingLocatorProperties")); + } + if (contentKeys() != null) { + contentKeys().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/StreamingPolicyInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/StreamingPolicyInner.java index 71e99a50eaa9..e5632903bae5 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/StreamingPolicyInner.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/StreamingPolicyInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; @@ -18,52 +17,30 @@ import java.time.OffsetDateTime; /** A Streaming Policy resource. */ -@JsonFlatten @Fluent -public class StreamingPolicyInner extends ProxyResource { +public final class StreamingPolicyInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(StreamingPolicyInner.class); /* - * The system metadata relating to this resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /* - * Creation time of Streaming Policy - */ - @JsonProperty(value = "properties.created", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime created; - - /* - * Default ContentKey used by current Streaming Policy - */ - @JsonProperty(value = "properties.defaultContentKeyPolicyName") - private String defaultContentKeyPolicyName; - - /* - * Configuration of EnvelopeEncryption - */ - @JsonProperty(value = "properties.envelopeEncryption") - private EnvelopeEncryption envelopeEncryption; - - /* - * Configuration of CommonEncryptionCenc + * Class to specify properties of Streaming Policy */ - @JsonProperty(value = "properties.commonEncryptionCenc") - private CommonEncryptionCenc commonEncryptionCenc; + @JsonProperty(value = "properties") + private StreamingPolicyProperties innerProperties; /* - * Configuration of CommonEncryptionCbcs + * The system metadata relating to this resource. */ - @JsonProperty(value = "properties.commonEncryptionCbcs") - private CommonEncryptionCbcs commonEncryptionCbcs; + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; - /* - * Configurations of NoEncryption + /** + * Get the innerProperties property: Class to specify properties of Streaming Policy. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.noEncryption") - private NoEncryption noEncryption; + private StreamingPolicyProperties innerProperties() { + return this.innerProperties; + } /** * Get the systemData property: The system metadata relating to this resource. @@ -80,7 +57,7 @@ public SystemData systemData() { * @return the created value. */ public OffsetDateTime created() { - return this.created; + return this.innerProperties() == null ? null : this.innerProperties().created(); } /** @@ -89,7 +66,7 @@ public OffsetDateTime created() { * @return the defaultContentKeyPolicyName value. */ public String defaultContentKeyPolicyName() { - return this.defaultContentKeyPolicyName; + return this.innerProperties() == null ? null : this.innerProperties().defaultContentKeyPolicyName(); } /** @@ -99,7 +76,10 @@ public String defaultContentKeyPolicyName() { * @return the StreamingPolicyInner object itself. */ public StreamingPolicyInner withDefaultContentKeyPolicyName(String defaultContentKeyPolicyName) { - this.defaultContentKeyPolicyName = defaultContentKeyPolicyName; + if (this.innerProperties() == null) { + this.innerProperties = new StreamingPolicyProperties(); + } + this.innerProperties().withDefaultContentKeyPolicyName(defaultContentKeyPolicyName); return this; } @@ -109,7 +89,7 @@ public StreamingPolicyInner withDefaultContentKeyPolicyName(String defaultConten * @return the envelopeEncryption value. */ public EnvelopeEncryption envelopeEncryption() { - return this.envelopeEncryption; + return this.innerProperties() == null ? null : this.innerProperties().envelopeEncryption(); } /** @@ -119,7 +99,10 @@ public EnvelopeEncryption envelopeEncryption() { * @return the StreamingPolicyInner object itself. */ public StreamingPolicyInner withEnvelopeEncryption(EnvelopeEncryption envelopeEncryption) { - this.envelopeEncryption = envelopeEncryption; + if (this.innerProperties() == null) { + this.innerProperties = new StreamingPolicyProperties(); + } + this.innerProperties().withEnvelopeEncryption(envelopeEncryption); return this; } @@ -129,7 +112,7 @@ public StreamingPolicyInner withEnvelopeEncryption(EnvelopeEncryption envelopeEn * @return the commonEncryptionCenc value. */ public CommonEncryptionCenc commonEncryptionCenc() { - return this.commonEncryptionCenc; + return this.innerProperties() == null ? null : this.innerProperties().commonEncryptionCenc(); } /** @@ -139,7 +122,10 @@ public CommonEncryptionCenc commonEncryptionCenc() { * @return the StreamingPolicyInner object itself. */ public StreamingPolicyInner withCommonEncryptionCenc(CommonEncryptionCenc commonEncryptionCenc) { - this.commonEncryptionCenc = commonEncryptionCenc; + if (this.innerProperties() == null) { + this.innerProperties = new StreamingPolicyProperties(); + } + this.innerProperties().withCommonEncryptionCenc(commonEncryptionCenc); return this; } @@ -149,7 +135,7 @@ public StreamingPolicyInner withCommonEncryptionCenc(CommonEncryptionCenc common * @return the commonEncryptionCbcs value. */ public CommonEncryptionCbcs commonEncryptionCbcs() { - return this.commonEncryptionCbcs; + return this.innerProperties() == null ? null : this.innerProperties().commonEncryptionCbcs(); } /** @@ -159,7 +145,10 @@ public CommonEncryptionCbcs commonEncryptionCbcs() { * @return the StreamingPolicyInner object itself. */ public StreamingPolicyInner withCommonEncryptionCbcs(CommonEncryptionCbcs commonEncryptionCbcs) { - this.commonEncryptionCbcs = commonEncryptionCbcs; + if (this.innerProperties() == null) { + this.innerProperties = new StreamingPolicyProperties(); + } + this.innerProperties().withCommonEncryptionCbcs(commonEncryptionCbcs); return this; } @@ -169,7 +158,7 @@ public StreamingPolicyInner withCommonEncryptionCbcs(CommonEncryptionCbcs common * @return the noEncryption value. */ public NoEncryption noEncryption() { - return this.noEncryption; + return this.innerProperties() == null ? null : this.innerProperties().noEncryption(); } /** @@ -179,7 +168,10 @@ public NoEncryption noEncryption() { * @return the StreamingPolicyInner object itself. */ public StreamingPolicyInner withNoEncryption(NoEncryption noEncryption) { - this.noEncryption = noEncryption; + if (this.innerProperties() == null) { + this.innerProperties = new StreamingPolicyProperties(); + } + this.innerProperties().withNoEncryption(noEncryption); return this; } @@ -189,17 +181,8 @@ public StreamingPolicyInner withNoEncryption(NoEncryption noEncryption) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (envelopeEncryption() != null) { - envelopeEncryption().validate(); - } - if (commonEncryptionCenc() != null) { - commonEncryptionCenc().validate(); - } - if (commonEncryptionCbcs() != null) { - commonEncryptionCbcs().validate(); - } - if (noEncryption() != null) { - noEncryption().validate(); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/StreamingPolicyProperties.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/StreamingPolicyProperties.java new file mode 100644 index 000000000000..a3e747f7f111 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/StreamingPolicyProperties.java @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mediaservices.models.CommonEncryptionCbcs; +import com.azure.resourcemanager.mediaservices.models.CommonEncryptionCenc; +import com.azure.resourcemanager.mediaservices.models.EnvelopeEncryption; +import com.azure.resourcemanager.mediaservices.models.NoEncryption; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Class to specify properties of Streaming Policy. */ +@Fluent +public final class StreamingPolicyProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StreamingPolicyProperties.class); + + /* + * Creation time of Streaming Policy + */ + @JsonProperty(value = "created", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime created; + + /* + * Default ContentKey used by current Streaming Policy + */ + @JsonProperty(value = "defaultContentKeyPolicyName") + private String defaultContentKeyPolicyName; + + /* + * Configuration of EnvelopeEncryption + */ + @JsonProperty(value = "envelopeEncryption") + private EnvelopeEncryption envelopeEncryption; + + /* + * Configuration of CommonEncryptionCenc + */ + @JsonProperty(value = "commonEncryptionCenc") + private CommonEncryptionCenc commonEncryptionCenc; + + /* + * Configuration of CommonEncryptionCbcs + */ + @JsonProperty(value = "commonEncryptionCbcs") + private CommonEncryptionCbcs commonEncryptionCbcs; + + /* + * Configurations of NoEncryption + */ + @JsonProperty(value = "noEncryption") + private NoEncryption noEncryption; + + /** + * Get the created property: Creation time of Streaming Policy. + * + * @return the created value. + */ + public OffsetDateTime created() { + return this.created; + } + + /** + * Get the defaultContentKeyPolicyName property: Default ContentKey used by current Streaming Policy. + * + * @return the defaultContentKeyPolicyName value. + */ + public String defaultContentKeyPolicyName() { + return this.defaultContentKeyPolicyName; + } + + /** + * Set the defaultContentKeyPolicyName property: Default ContentKey used by current Streaming Policy. + * + * @param defaultContentKeyPolicyName the defaultContentKeyPolicyName value to set. + * @return the StreamingPolicyProperties object itself. + */ + public StreamingPolicyProperties withDefaultContentKeyPolicyName(String defaultContentKeyPolicyName) { + this.defaultContentKeyPolicyName = defaultContentKeyPolicyName; + return this; + } + + /** + * Get the envelopeEncryption property: Configuration of EnvelopeEncryption. + * + * @return the envelopeEncryption value. + */ + public EnvelopeEncryption envelopeEncryption() { + return this.envelopeEncryption; + } + + /** + * Set the envelopeEncryption property: Configuration of EnvelopeEncryption. + * + * @param envelopeEncryption the envelopeEncryption value to set. + * @return the StreamingPolicyProperties object itself. + */ + public StreamingPolicyProperties withEnvelopeEncryption(EnvelopeEncryption envelopeEncryption) { + this.envelopeEncryption = envelopeEncryption; + return this; + } + + /** + * Get the commonEncryptionCenc property: Configuration of CommonEncryptionCenc. + * + * @return the commonEncryptionCenc value. + */ + public CommonEncryptionCenc commonEncryptionCenc() { + return this.commonEncryptionCenc; + } + + /** + * Set the commonEncryptionCenc property: Configuration of CommonEncryptionCenc. + * + * @param commonEncryptionCenc the commonEncryptionCenc value to set. + * @return the StreamingPolicyProperties object itself. + */ + public StreamingPolicyProperties withCommonEncryptionCenc(CommonEncryptionCenc commonEncryptionCenc) { + this.commonEncryptionCenc = commonEncryptionCenc; + return this; + } + + /** + * Get the commonEncryptionCbcs property: Configuration of CommonEncryptionCbcs. + * + * @return the commonEncryptionCbcs value. + */ + public CommonEncryptionCbcs commonEncryptionCbcs() { + return this.commonEncryptionCbcs; + } + + /** + * Set the commonEncryptionCbcs property: Configuration of CommonEncryptionCbcs. + * + * @param commonEncryptionCbcs the commonEncryptionCbcs value to set. + * @return the StreamingPolicyProperties object itself. + */ + public StreamingPolicyProperties withCommonEncryptionCbcs(CommonEncryptionCbcs commonEncryptionCbcs) { + this.commonEncryptionCbcs = commonEncryptionCbcs; + return this; + } + + /** + * Get the noEncryption property: Configurations of NoEncryption. + * + * @return the noEncryption value. + */ + public NoEncryption noEncryption() { + return this.noEncryption; + } + + /** + * Set the noEncryption property: Configurations of NoEncryption. + * + * @param noEncryption the noEncryption value to set. + * @return the StreamingPolicyProperties object itself. + */ + public StreamingPolicyProperties withNoEncryption(NoEncryption noEncryption) { + this.noEncryption = noEncryption; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (envelopeEncryption() != null) { + envelopeEncryption().validate(); + } + if (commonEncryptionCenc() != null) { + commonEncryptionCenc().validate(); + } + if (commonEncryptionCbcs() != null) { + commonEncryptionCbcs().validate(); + } + if (noEncryption() != null) { + noEncryption().validate(); + } + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/TransformInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/TransformInner.java index bcbc457b633f..43b491291c20 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/TransformInner.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/TransformInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; @@ -20,43 +19,30 @@ * transcoding or by extracting insights. After the Transform is created, it can be applied to input media by creating * Jobs. */ -@JsonFlatten @Fluent -public class TransformInner extends ProxyResource { +public final class TransformInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(TransformInner.class); /* - * The system metadata relating to this resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /* - * The UTC date and time when the Transform was created, in - * 'YYYY-MM-DDThh:mm:ssZ' format. - */ - @JsonProperty(value = "properties.created", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime created; - - /* - * An optional verbose description of the Transform. + * The resource properties. */ - @JsonProperty(value = "properties.description") - private String description; + @JsonProperty(value = "properties") + private TransformProperties innerProperties; /* - * The UTC date and time when the Transform was last updated, in - * 'YYYY-MM-DDThh:mm:ssZ' format. + * The system metadata relating to this resource. */ - @JsonProperty(value = "properties.lastModified", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModified; + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; - /* - * An array of one or more TransformOutputs that the Transform should - * generate. + /** + * Get the innerProperties property: The resource properties. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.outputs") - private List outputs; + private TransformProperties innerProperties() { + return this.innerProperties; + } /** * Get the systemData property: The system metadata relating to this resource. @@ -73,7 +59,7 @@ public SystemData systemData() { * @return the created value. */ public OffsetDateTime created() { - return this.created; + return this.innerProperties() == null ? null : this.innerProperties().created(); } /** @@ -82,7 +68,7 @@ public OffsetDateTime created() { * @return the description value. */ public String description() { - return this.description; + return this.innerProperties() == null ? null : this.innerProperties().description(); } /** @@ -92,7 +78,10 @@ public String description() { * @return the TransformInner object itself. */ public TransformInner withDescription(String description) { - this.description = description; + if (this.innerProperties() == null) { + this.innerProperties = new TransformProperties(); + } + this.innerProperties().withDescription(description); return this; } @@ -103,7 +92,7 @@ public TransformInner withDescription(String description) { * @return the lastModified value. */ public OffsetDateTime lastModified() { - return this.lastModified; + return this.innerProperties() == null ? null : this.innerProperties().lastModified(); } /** @@ -112,7 +101,7 @@ public OffsetDateTime lastModified() { * @return the outputs value. */ public List outputs() { - return this.outputs; + return this.innerProperties() == null ? null : this.innerProperties().outputs(); } /** @@ -122,7 +111,10 @@ public List outputs() { * @return the TransformInner object itself. */ public TransformInner withOutputs(List outputs) { - this.outputs = outputs; + if (this.innerProperties() == null) { + this.innerProperties = new TransformProperties(); + } + this.innerProperties().withOutputs(outputs); return this; } @@ -132,8 +124,8 @@ public TransformInner withOutputs(List outputs) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (outputs() != null) { - outputs().forEach(e -> e.validate()); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/TransformProperties.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/TransformProperties.java new file mode 100644 index 000000000000..15247fa05e29 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/TransformProperties.java @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mediaservices.models.TransformOutput; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** A Transform. */ +@Fluent +public final class TransformProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TransformProperties.class); + + /* + * The UTC date and time when the Transform was created, in + * 'YYYY-MM-DDThh:mm:ssZ' format. + */ + @JsonProperty(value = "created", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime created; + + /* + * An optional verbose description of the Transform. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The UTC date and time when the Transform was last updated, in + * 'YYYY-MM-DDThh:mm:ssZ' format. + */ + @JsonProperty(value = "lastModified", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastModified; + + /* + * An array of one or more TransformOutputs that the Transform should + * generate. + */ + @JsonProperty(value = "outputs", required = true) + private List outputs; + + /** + * Get the created property: The UTC date and time when the Transform was created, in 'YYYY-MM-DDThh:mm:ssZ' format. + * + * @return the created value. + */ + public OffsetDateTime created() { + return this.created; + } + + /** + * Get the description property: An optional verbose description of the Transform. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: An optional verbose description of the Transform. + * + * @param description the description value to set. + * @return the TransformProperties object itself. + */ + public TransformProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the lastModified property: The UTC date and time when the Transform was last updated, in + * 'YYYY-MM-DDThh:mm:ssZ' format. + * + * @return the lastModified value. + */ + public OffsetDateTime lastModified() { + return this.lastModified; + } + + /** + * Get the outputs property: An array of one or more TransformOutputs that the Transform should generate. + * + * @return the outputs value. + */ + public List outputs() { + return this.outputs; + } + + /** + * Set the outputs property: An array of one or more TransformOutputs that the Transform should generate. + * + * @param outputs the outputs value to set. + * @return the TransformProperties object itself. + */ + public TransformProperties withOutputs(List outputs) { + this.outputs = outputs; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (outputs() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property outputs in model TransformProperties")); + } else { + outputs().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveEventsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveEventsClientImpl.java index 8182f925da39..bf7fb19acde6 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 @@ -236,7 +236,7 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the LiveEvent list result. + * @return liveEventListResult. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String accountName) { @@ -293,7 +293,7 @@ private Mono> listSinglePageAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the LiveEvent list result. + * @return liveEventListResult. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -347,7 +347,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the LiveEvent list result. + * @return liveEventListResult. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String accountName) { @@ -364,7 +364,7 @@ private PagedFlux listAsync(String resourceGroupName, String acc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the LiveEvent list result. + * @return liveEventListResult. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String accountName, Context context) { @@ -381,7 +381,7 @@ private PagedFlux listAsync(String resourceGroupName, String acc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the LiveEvent list result. + * @return liveEventListResult. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String accountName) { @@ -397,7 +397,7 @@ public PagedIterable list(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 the LiveEvent list result. + * @return liveEventListResult. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String accountName, Context context) { @@ -710,7 +710,7 @@ private Mono>> createWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the live event. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LiveEventInner> beginCreateAsync( String resourceGroupName, String accountName, @@ -739,7 +739,7 @@ private PollerFlux, LiveEventInner> beginCreateAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the live event. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LiveEventInner> beginCreateAsync( String resourceGroupName, String accountName, @@ -769,7 +769,7 @@ private PollerFlux, LiveEventInner> beginCreateAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the live event. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LiveEventInner> beginCreate( String resourceGroupName, String accountName, @@ -793,7 +793,7 @@ public SyncPoller, LiveEventInner> beginCreate( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the live event. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LiveEventInner> beginCreate( String resourceGroupName, String accountName, @@ -1079,7 +1079,7 @@ private Mono>> updateWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the live event. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LiveEventInner> beginUpdateAsync( String resourceGroupName, String accountName, String liveEventName, LiveEventInner parameters) { Mono>> mono = @@ -1103,7 +1103,7 @@ private PollerFlux, LiveEventInner> beginUpdateAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the live event. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LiveEventInner> beginUpdateAsync( String resourceGroupName, String accountName, @@ -1131,7 +1131,7 @@ private PollerFlux, LiveEventInner> beginUpdateAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the live event. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LiveEventInner> beginUpdate( String resourceGroupName, String accountName, String liveEventName, LiveEventInner parameters) { return beginUpdateAsync(resourceGroupName, accountName, liveEventName, parameters).getSyncPoller(); @@ -1150,7 +1150,7 @@ public SyncPoller, LiveEventInner> beginUpdate( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the live event. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LiveEventInner> beginUpdate( String resourceGroupName, String accountName, @@ -1361,7 +1361,7 @@ private Mono>> deleteWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String accountName, String liveEventName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, accountName, liveEventName); @@ -1382,7 +1382,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String accountName, String liveEventName, Context context) { context = this.client.mergeContext(context); @@ -1404,7 +1404,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, String liveEventName) { return beginDeleteAsync(resourceGroupName, accountName, liveEventName).getSyncPoller(); @@ -1422,7 +1422,7 @@ public SyncPoller, Void> beginDelete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, String liveEventName, Context context) { return beginDeleteAsync(resourceGroupName, accountName, liveEventName, context).getSyncPoller(); @@ -1612,7 +1612,7 @@ private Mono>> allocateWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginAllocateAsync( String resourceGroupName, String accountName, String liveEventName) { Mono>> mono = @@ -1634,7 +1634,7 @@ private PollerFlux, Void> beginAllocateAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginAllocateAsync( String resourceGroupName, String accountName, String liveEventName, Context context) { context = this.client.mergeContext(context); @@ -1656,7 +1656,7 @@ private PollerFlux, Void> beginAllocateAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginAllocate( String resourceGroupName, String accountName, String liveEventName) { return beginAllocateAsync(resourceGroupName, accountName, liveEventName).getSyncPoller(); @@ -1674,7 +1674,7 @@ public SyncPoller, Void> beginAllocate( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginAllocate( String resourceGroupName, String accountName, String liveEventName, Context context) { return beginAllocateAsync(resourceGroupName, accountName, liveEventName, context).getSyncPoller(); @@ -1864,7 +1864,7 @@ private Mono>> startWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStartAsync( String resourceGroupName, String accountName, String liveEventName) { Mono>> mono = startWithResponseAsync(resourceGroupName, accountName, liveEventName); @@ -1885,7 +1885,7 @@ private PollerFlux, Void> beginStartAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStartAsync( String resourceGroupName, String accountName, String liveEventName, Context context) { context = this.client.mergeContext(context); @@ -1907,7 +1907,7 @@ private PollerFlux, Void> beginStartAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStart( String resourceGroupName, String accountName, String liveEventName) { return beginStartAsync(resourceGroupName, accountName, liveEventName).getSyncPoller(); @@ -1925,7 +1925,7 @@ public SyncPoller, Void> beginStart( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStart( String resourceGroupName, String accountName, String liveEventName, Context context) { return beginStartAsync(resourceGroupName, accountName, liveEventName, context).getSyncPoller(); @@ -2133,7 +2133,7 @@ private Mono>> stopWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStopAsync( String resourceGroupName, String accountName, String liveEventName, LiveEventActionInput parameters) { Mono>> mono = @@ -2156,7 +2156,7 @@ private PollerFlux, Void> beginStopAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStopAsync( String resourceGroupName, String accountName, @@ -2183,7 +2183,7 @@ private PollerFlux, Void> beginStopAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStop( String resourceGroupName, String accountName, String liveEventName, LiveEventActionInput parameters) { return beginStopAsync(resourceGroupName, accountName, liveEventName, parameters).getSyncPoller(); @@ -2202,7 +2202,7 @@ public SyncPoller, Void> beginStop( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStop( String resourceGroupName, String accountName, @@ -2417,7 +2417,7 @@ private Mono>> resetWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginResetAsync( String resourceGroupName, String accountName, String liveEventName) { Mono>> mono = resetWithResponseAsync(resourceGroupName, accountName, liveEventName); @@ -2440,7 +2440,7 @@ private PollerFlux, Void> beginResetAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginResetAsync( String resourceGroupName, String accountName, String liveEventName, Context context) { context = this.client.mergeContext(context); @@ -2464,7 +2464,7 @@ private PollerFlux, Void> beginResetAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginReset( String resourceGroupName, String accountName, String liveEventName) { return beginResetAsync(resourceGroupName, accountName, liveEventName).getSyncPoller(); @@ -2484,7 +2484,7 @@ public SyncPoller, Void> beginReset( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginReset( String resourceGroupName, String accountName, String liveEventName, Context context) { return beginResetAsync(resourceGroupName, accountName, liveEventName, context).getSyncPoller(); @@ -2573,7 +2573,7 @@ public void reset(String resourceGroupName, String accountName, String liveEvent * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the LiveEvent list result. + * @return liveEventListResult. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -2609,7 +2609,7 @@ private Mono> listNextSinglePageAsync(String nextL * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the LiveEvent list result. + * @return liveEventListResult. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveOutputsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveOutputsClientImpl.java index 59357c3e0e78..64af53e10650 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 @@ -155,7 +155,7 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the LiveOutput list result. + * @return liveOutputListResult. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -218,7 +218,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the LiveOutput list result. + * @return liveOutputListResult. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -277,7 +277,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the LiveOutput list result. + * @return liveOutputListResult. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String accountName, String liveEventName) { @@ -296,7 +296,7 @@ private PagedFlux listAsync(String resourceGroupName, String ac * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the LiveOutput list result. + * @return liveOutputListResult. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -315,7 +315,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the LiveOutput list result. + * @return liveOutputListResult. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String accountName, String liveEventName) { @@ -332,7 +332,7 @@ public PagedIterable list(String resourceGroupName, String acco * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the LiveOutput list result. + * @return liveOutputListResult. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -667,7 +667,7 @@ private Mono>> createWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Live Output. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LiveOutputInner> beginCreateAsync( String resourceGroupName, String accountName, @@ -696,7 +696,7 @@ private PollerFlux, LiveOutputInner> beginCreateAsyn * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Live Output. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LiveOutputInner> beginCreateAsync( String resourceGroupName, String accountName, @@ -726,7 +726,7 @@ private PollerFlux, LiveOutputInner> beginCreateAsyn * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Live Output. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LiveOutputInner> beginCreate( String resourceGroupName, String accountName, @@ -751,7 +751,7 @@ public SyncPoller, LiveOutputInner> beginCreate( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Live Output. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LiveOutputInner> beginCreate( String resourceGroupName, String accountName, @@ -989,7 +989,7 @@ private Mono>> deleteWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String accountName, String liveEventName, String liveOutputName) { Mono>> mono = @@ -1012,7 +1012,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String accountName, String liveEventName, String liveOutputName, Context context) { context = this.client.mergeContext(context); @@ -1035,7 +1035,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, String liveEventName, String liveOutputName) { return beginDeleteAsync(resourceGroupName, accountName, liveEventName, liveOutputName).getSyncPoller(); @@ -1054,7 +1054,7 @@ public SyncPoller, Void> beginDelete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, String liveEventName, String liveOutputName, Context context) { return beginDeleteAsync(resourceGroupName, accountName, liveEventName, liveOutputName, context).getSyncPoller(); @@ -1142,7 +1142,7 @@ public void delete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the LiveOutput list result. + * @return liveOutputListResult. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1178,7 +1178,7 @@ private Mono> listNextSinglePageAsync(String next * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the LiveOutput list result. + * @return liveOutputListResult. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingEndpointImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingEndpointImpl.java index ee09eaa393f6..bb1007fc7d64 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingEndpointImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingEndpointImpl.java @@ -57,7 +57,7 @@ public String description() { return this.innerModel().description(); } - public Integer scaleUnits() { + public int scaleUnits() { return this.innerModel().scaleUnits(); } @@ -282,7 +282,7 @@ public StreamingEndpointImpl withDescription(String description) { return this; } - public StreamingEndpointImpl withScaleUnits(Integer scaleUnits) { + public StreamingEndpointImpl withScaleUnits(int scaleUnits) { this.innerModel().withScaleUnits(scaleUnits); return this; } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingEndpointsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingEndpointsClientImpl.java index 9ac0ad4ae1ec..945ea83a54af 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 @@ -220,7 +220,7 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the streaming endpoint list result. + * @return streamingEndpointListResult. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -278,7 +278,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the streaming endpoint list result. + * @return streamingEndpointListResult. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -332,7 +332,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the streaming endpoint list result. + * @return streamingEndpointListResult. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String accountName) { @@ -349,7 +349,7 @@ private PagedFlux listAsync(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the streaming endpoint list result. + * @return streamingEndpointListResult. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String accountName, Context context) { @@ -366,7 +366,7 @@ private PagedFlux listAsync(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the streaming endpoint list result. + * @return streamingEndpointListResult. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String accountName) { @@ -382,7 +382,7 @@ public PagedIterable list(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the streaming endpoint list result. + * @return streamingEndpointListResult. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String accountName, Context context) { @@ -700,7 +700,7 @@ private Mono>> createWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the streaming endpoint. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, StreamingEndpointInner> beginCreateAsync( String resourceGroupName, String accountName, @@ -733,7 +733,7 @@ private PollerFlux, StreamingEndpointInner> b * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the streaming endpoint. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, StreamingEndpointInner> beginCreateAsync( String resourceGroupName, String accountName, @@ -768,7 +768,7 @@ private PollerFlux, StreamingEndpointInner> b * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the streaming endpoint. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, StreamingEndpointInner> beginCreate( String resourceGroupName, String accountName, @@ -793,7 +793,7 @@ public SyncPoller, StreamingEndpointInner> be * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the streaming endpoint. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, StreamingEndpointInner> beginCreate( String resourceGroupName, String accountName, @@ -1082,7 +1082,7 @@ private Mono>> updateWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the streaming endpoint. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, StreamingEndpointInner> beginUpdateAsync( String resourceGroupName, String accountName, String streamingEndpointName, StreamingEndpointInner parameters) { Mono>> mono = @@ -1110,7 +1110,7 @@ private PollerFlux, StreamingEndpointInner> b * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the streaming endpoint. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, StreamingEndpointInner> beginUpdateAsync( String resourceGroupName, String accountName, @@ -1142,7 +1142,7 @@ private PollerFlux, StreamingEndpointInner> b * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the streaming endpoint. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, StreamingEndpointInner> beginUpdate( String resourceGroupName, String accountName, String streamingEndpointName, StreamingEndpointInner parameters) { return beginUpdateAsync(resourceGroupName, accountName, streamingEndpointName, parameters).getSyncPoller(); @@ -1161,7 +1161,7 @@ public SyncPoller, StreamingEndpointInner> be * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the streaming endpoint. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, StreamingEndpointInner> beginUpdate( String resourceGroupName, String accountName, @@ -1375,7 +1375,7 @@ private Mono>> deleteWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String accountName, String streamingEndpointName) { Mono>> mono = @@ -1397,7 +1397,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String accountName, String streamingEndpointName, Context context) { context = this.client.mergeContext(context); @@ -1419,7 +1419,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, String streamingEndpointName) { return beginDeleteAsync(resourceGroupName, accountName, streamingEndpointName).getSyncPoller(); @@ -1437,7 +1437,7 @@ public SyncPoller, Void> beginDelete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, String streamingEndpointName, Context context) { return beginDeleteAsync(resourceGroupName, accountName, streamingEndpointName, context).getSyncPoller(); @@ -1629,7 +1629,7 @@ private Mono>> startWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStartAsync( String resourceGroupName, String accountName, String streamingEndpointName) { Mono>> mono = @@ -1651,7 +1651,7 @@ private PollerFlux, Void> beginStartAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStartAsync( String resourceGroupName, String accountName, String streamingEndpointName, Context context) { context = this.client.mergeContext(context); @@ -1673,7 +1673,7 @@ private PollerFlux, Void> beginStartAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStart( String resourceGroupName, String accountName, String streamingEndpointName) { return beginStartAsync(resourceGroupName, accountName, streamingEndpointName).getSyncPoller(); @@ -1691,7 +1691,7 @@ public SyncPoller, Void> beginStart( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStart( String resourceGroupName, String accountName, String streamingEndpointName, Context context) { return beginStartAsync(resourceGroupName, accountName, streamingEndpointName, context).getSyncPoller(); @@ -1883,7 +1883,7 @@ private Mono>> stopWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStopAsync( String resourceGroupName, String accountName, String streamingEndpointName) { Mono>> mono = @@ -1905,7 +1905,7 @@ private PollerFlux, Void> beginStopAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStopAsync( String resourceGroupName, String accountName, String streamingEndpointName, Context context) { context = this.client.mergeContext(context); @@ -1927,7 +1927,7 @@ private PollerFlux, Void> beginStopAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStop( String resourceGroupName, String accountName, String streamingEndpointName) { return beginStopAsync(resourceGroupName, accountName, streamingEndpointName).getSyncPoller(); @@ -1945,7 +1945,7 @@ public SyncPoller, Void> beginStop( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStop( String resourceGroupName, String accountName, String streamingEndpointName, Context context) { return beginStopAsync(resourceGroupName, accountName, streamingEndpointName, context).getSyncPoller(); @@ -2159,7 +2159,7 @@ private Mono>> scaleWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginScaleAsync( String resourceGroupName, String accountName, @@ -2185,7 +2185,7 @@ private PollerFlux, Void> beginScaleAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginScaleAsync( String resourceGroupName, String accountName, @@ -2212,7 +2212,7 @@ private PollerFlux, Void> beginScaleAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginScale( String resourceGroupName, String accountName, @@ -2234,7 +2234,7 @@ public SyncPoller, Void> beginScale( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginScale( String resourceGroupName, String accountName, @@ -2342,7 +2342,7 @@ public void scale( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the streaming endpoint list result. + * @return streamingEndpointListResult. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -2378,7 +2378,7 @@ private Mono> listNextSinglePageAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the streaming endpoint list result. + * @return streamingEndpointListResult. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AacAudio.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AacAudio.java index 3d1849b019f3..d500ce156753 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AacAudio.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AacAudio.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -13,11 +12,10 @@ import com.fasterxml.jackson.annotation.JsonTypeName; /** Describes Advanced Audio Codec (AAC) audio encoding settings. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.AacAudio") -@JsonFlatten @Fluent -public class AacAudio extends Audio { +public final class AacAudio extends Audio { @JsonIgnore private final ClientLogger logger = new ClientLogger(AacAudio.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AbsoluteClipTime.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AbsoluteClipTime.java index 7ef886029bf9..8583ff929dbe 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AbsoluteClipTime.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AbsoluteClipTime.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -17,11 +16,10 @@ * Specifies the clip time as an absolute time position in the media file. The absolute time can point to a different * position depending on whether the media file starts from a timestamp of zero or not. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.AbsoluteClipTime") -@JsonFlatten @Fluent -public class AbsoluteClipTime extends ClipTime { +public final class AbsoluteClipTime extends ClipTime { @JsonIgnore private final ClientLogger logger = new ClientLogger(AbsoluteClipTime.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Audio.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Audio.java index e7bbd4fbaa27..7e8789370579 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Audio.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Audio.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -17,11 +16,10 @@ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", + property = "@odata.type", defaultImpl = Audio.class) @JsonTypeName("#Microsoft.Media.Audio") @JsonSubTypes({@JsonSubTypes.Type(name = "#Microsoft.Media.AacAudio", value = AacAudio.class)}) -@JsonFlatten @Fluent public class Audio extends Codec { @JsonIgnore private final ClientLogger logger = new ClientLogger(Audio.class); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AudioAnalyzerPreset.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AudioAnalyzerPreset.java index 74082352cb39..878cb22fb42d 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AudioAnalyzerPreset.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AudioAnalyzerPreset.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -21,11 +21,10 @@ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", + property = "@odata.type", defaultImpl = AudioAnalyzerPreset.class) @JsonTypeName("#Microsoft.Media.AudioAnalyzerPreset") @JsonSubTypes({@JsonSubTypes.Type(name = "#Microsoft.Media.VideoAnalyzerPreset", value = VideoAnalyzerPreset.class)}) -@JsonFlatten @Fluent public class AudioAnalyzerPreset extends Preset { @JsonIgnore private final ClientLogger logger = new ClientLogger(AudioAnalyzerPreset.class); @@ -61,6 +60,7 @@ public class AudioAnalyzerPreset extends Preset { * preset itself */ @JsonProperty(value = "experimentalOptions") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map experimentalOptions; /** diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AudioOverlay.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AudioOverlay.java index 3ec53b2249f6..e3c8c60b71f2 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AudioOverlay.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AudioOverlay.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -13,11 +12,10 @@ import java.time.Duration; /** Describes the properties of an audio overlay. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.AudioOverlay") -@JsonFlatten @Fluent -public class AudioOverlay extends Overlay { +public final class AudioOverlay extends Overlay { @JsonIgnore private final ClientLogger logger = new ClientLogger(AudioOverlay.class); /** {@inheritDoc} */ diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AudioTrackDescriptor.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AudioTrackDescriptor.java index e6b5c5dcaecb..ccaa1dc20f77 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AudioTrackDescriptor.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AudioTrackDescriptor.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -17,7 +16,7 @@ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", + property = "@odata.type", defaultImpl = AudioTrackDescriptor.class) @JsonTypeName("#Microsoft.Media.AudioTrackDescriptor") @JsonSubTypes({ @@ -26,7 +25,6 @@ value = SelectAudioTrackByAttribute.class), @JsonSubTypes.Type(name = "#Microsoft.Media.SelectAudioTrackById", value = SelectAudioTrackById.class) }) -@JsonFlatten @Fluent public class AudioTrackDescriptor extends TrackDescriptor { @JsonIgnore private final ClientLogger logger = new ClientLogger(AudioTrackDescriptor.class); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/BuiltInStandardEncoderPreset.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/BuiltInStandardEncoderPreset.java index e5897c582758..fef71ed96bcb 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/BuiltInStandardEncoderPreset.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/BuiltInStandardEncoderPreset.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -13,11 +12,10 @@ import com.fasterxml.jackson.annotation.JsonTypeName; /** Describes a built-in preset for encoding the input video with the Standard Encoder. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.BuiltInStandardEncoderPreset") -@JsonFlatten @Fluent -public class BuiltInStandardEncoderPreset extends Preset { +public final class BuiltInStandardEncoderPreset extends Preset { @JsonIgnore private final ClientLogger logger = new ClientLogger(BuiltInStandardEncoderPreset.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ClipTime.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ClipTime.java index 6de88134d1f7..b6f62cd8f24a 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ClipTime.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ClipTime.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonSubTypes; @@ -16,14 +15,13 @@ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", + property = "@odata.type", defaultImpl = ClipTime.class) @JsonTypeName("ClipTime") @JsonSubTypes({ @JsonSubTypes.Type(name = "#Microsoft.Media.AbsoluteClipTime", value = AbsoluteClipTime.class), @JsonSubTypes.Type(name = "#Microsoft.Media.UtcClipTime", value = UtcClipTime.class) }) -@JsonFlatten @Immutable public class ClipTime { @JsonIgnore private final ClientLogger logger = new ClientLogger(ClipTime.class); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Codec.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Codec.java index b7eb3c2e4d2d..dcbf862d961c 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Codec.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Codec.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -17,7 +16,7 @@ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", + property = "@odata.type", defaultImpl = Codec.class) @JsonTypeName("Codec") @JsonSubTypes({ @@ -26,7 +25,6 @@ @JsonSubTypes.Type(name = "#Microsoft.Media.CopyVideo", value = CopyVideo.class), @JsonSubTypes.Type(name = "#Microsoft.Media.CopyAudio", value = CopyAudio.class) }) -@JsonFlatten @Fluent public class Codec { @JsonIgnore private final ClientLogger logger = new ClientLogger(Codec.class); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyClearKeyConfiguration.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyClearKeyConfiguration.java index 52c83649e53a..c5ec8dafdeaf 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyClearKeyConfiguration.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyClearKeyConfiguration.java @@ -5,18 +5,16 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; /** Represents a configuration for non-DRM keys. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration") -@JsonFlatten @Immutable -public class ContentKeyPolicyClearKeyConfiguration extends ContentKeyPolicyConfiguration { +public final class ContentKeyPolicyClearKeyConfiguration extends ContentKeyPolicyConfiguration { @JsonIgnore private final ClientLogger logger = new ClientLogger(ContentKeyPolicyClearKeyConfiguration.class); /** diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyConfiguration.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyConfiguration.java index 12e5de21c8de..f5e836ccd7c1 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyConfiguration.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyConfiguration.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonSubTypes; @@ -16,7 +15,7 @@ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", + property = "@odata.type", defaultImpl = ContentKeyPolicyConfiguration.class) @JsonTypeName("ContentKeyPolicyConfiguration") @JsonSubTypes({ @@ -36,7 +35,6 @@ name = "#Microsoft.Media.ContentKeyPolicyFairPlayConfiguration", value = ContentKeyPolicyFairPlayConfiguration.class) }) -@JsonFlatten @Immutable public class ContentKeyPolicyConfiguration { @JsonIgnore private final ClientLogger logger = new ClientLogger(ContentKeyPolicyConfiguration.class); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyFairPlayConfiguration.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyFairPlayConfiguration.java index db2ca40c32b6..2ccc2279608f 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyFairPlayConfiguration.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyFairPlayConfiguration.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -14,11 +13,10 @@ import com.fasterxml.jackson.annotation.JsonTypeName; /** Specifies a configuration for FairPlay licenses. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.ContentKeyPolicyFairPlayConfiguration") -@JsonFlatten @Fluent -public class ContentKeyPolicyFairPlayConfiguration extends ContentKeyPolicyConfiguration { +public final class ContentKeyPolicyFairPlayConfiguration extends ContentKeyPolicyConfiguration { @JsonIgnore private final ClientLogger logger = new ClientLogger(ContentKeyPolicyFairPlayConfiguration.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyOpenRestriction.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyOpenRestriction.java index 9ae3f2cf0aab..3e52d2d0e260 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyOpenRestriction.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyOpenRestriction.java @@ -5,18 +5,16 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; /** Represents an open restriction. License or key will be delivered on every request. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.ContentKeyPolicyOpenRestriction") -@JsonFlatten @Immutable -public class ContentKeyPolicyOpenRestriction extends ContentKeyPolicyRestriction { +public final class ContentKeyPolicyOpenRestriction extends ContentKeyPolicyRestriction { @JsonIgnore private final ClientLogger logger = new ClientLogger(ContentKeyPolicyOpenRestriction.class); /** diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyPlayReadyConfiguration.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyPlayReadyConfiguration.java index 21b29e5d3c38..996211afae7c 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyPlayReadyConfiguration.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyPlayReadyConfiguration.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -14,11 +13,10 @@ import java.util.List; /** Specifies a configuration for PlayReady licenses. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.ContentKeyPolicyPlayReadyConfiguration") -@JsonFlatten @Fluent -public class ContentKeyPolicyPlayReadyConfiguration extends ContentKeyPolicyConfiguration { +public final class ContentKeyPolicyPlayReadyConfiguration extends ContentKeyPolicyConfiguration { @JsonIgnore private final ClientLogger logger = new ClientLogger(ContentKeyPolicyPlayReadyConfiguration.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader.java index 4a507ba25f8d..59fd30a4583f 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader.java @@ -5,18 +5,16 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; /** Specifies that the content key ID is in the PlayReady header. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader") -@JsonFlatten @Immutable -public class ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader +public final class ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader extends ContentKeyPolicyPlayReadyContentKeyLocation { @JsonIgnore private final ClientLogger logger = new ClientLogger(ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader.class); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier.java index f738b5307cfe..a15a13d3b2db 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -14,11 +13,10 @@ import java.util.UUID; /** Specifies that the content key ID is specified in the PlayReady configuration. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier") -@JsonFlatten @Fluent -public class ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier +public final class ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier extends ContentKeyPolicyPlayReadyContentKeyLocation { @JsonIgnore private final ClientLogger logger = diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyPlayReadyContentKeyLocation.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyPlayReadyContentKeyLocation.java index 23077fb7f2a6..d5aa3158bc35 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyPlayReadyContentKeyLocation.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyPlayReadyContentKeyLocation.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonSubTypes; @@ -16,7 +15,7 @@ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", + property = "@odata.type", defaultImpl = ContentKeyPolicyPlayReadyContentKeyLocation.class) @JsonTypeName("ContentKeyPolicyPlayReadyContentKeyLocation") @JsonSubTypes({ @@ -27,7 +26,6 @@ name = "#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier", value = ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier.class) }) -@JsonFlatten @Immutable public class ContentKeyPolicyPlayReadyContentKeyLocation { @JsonIgnore private final ClientLogger logger = new ClientLogger(ContentKeyPolicyPlayReadyContentKeyLocation.class); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyRestriction.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyRestriction.java index 99201ef2fd25..47f7f7cb4ce8 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyRestriction.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyRestriction.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonSubTypes; @@ -16,7 +15,7 @@ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", + property = "@odata.type", defaultImpl = ContentKeyPolicyRestriction.class) @JsonTypeName("ContentKeyPolicyRestriction") @JsonSubTypes({ @@ -30,7 +29,6 @@ name = "#Microsoft.Media.ContentKeyPolicyTokenRestriction", value = ContentKeyPolicyTokenRestriction.class) }) -@JsonFlatten @Immutable public class ContentKeyPolicyRestriction { @JsonIgnore private final ClientLogger logger = new ClientLogger(ContentKeyPolicyRestriction.class); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyRestrictionTokenKey.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyRestrictionTokenKey.java index 8e5e9ede7e5e..ed0053cd1811 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyRestrictionTokenKey.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyRestrictionTokenKey.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonSubTypes; @@ -16,7 +15,7 @@ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", + property = "@odata.type", defaultImpl = ContentKeyPolicyRestrictionTokenKey.class) @JsonTypeName("ContentKeyPolicyRestrictionTokenKey") @JsonSubTypes({ @@ -30,7 +29,6 @@ name = "#Microsoft.Media.ContentKeyPolicyX509CertificateTokenKey", value = ContentKeyPolicyX509CertificateTokenKey.class) }) -@JsonFlatten @Immutable public class ContentKeyPolicyRestrictionTokenKey { @JsonIgnore private final ClientLogger logger = new ClientLogger(ContentKeyPolicyRestrictionTokenKey.class); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyRsaTokenKey.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyRsaTokenKey.java index ecf9ad8c78c8..92c0fc7c8598 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyRsaTokenKey.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyRsaTokenKey.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -14,11 +13,10 @@ import com.fasterxml.jackson.annotation.JsonTypeName; /** Specifies a RSA key for token validation. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.ContentKeyPolicyRsaTokenKey") -@JsonFlatten @Fluent -public class ContentKeyPolicyRsaTokenKey extends ContentKeyPolicyRestrictionTokenKey { +public final class ContentKeyPolicyRsaTokenKey extends ContentKeyPolicyRestrictionTokenKey { @JsonIgnore private final ClientLogger logger = new ClientLogger(ContentKeyPolicyRsaTokenKey.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicySymmetricTokenKey.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicySymmetricTokenKey.java index ea6e5463d6b1..9f0dad7cb235 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicySymmetricTokenKey.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicySymmetricTokenKey.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -14,11 +13,10 @@ import com.fasterxml.jackson.annotation.JsonTypeName; /** Specifies a symmetric key for token validation. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.ContentKeyPolicySymmetricTokenKey") -@JsonFlatten @Fluent -public class ContentKeyPolicySymmetricTokenKey extends ContentKeyPolicyRestrictionTokenKey { +public final class ContentKeyPolicySymmetricTokenKey extends ContentKeyPolicyRestrictionTokenKey { @JsonIgnore private final ClientLogger logger = new ClientLogger(ContentKeyPolicySymmetricTokenKey.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyTokenRestriction.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyTokenRestriction.java index beab34d41120..28c45a9e38db 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyTokenRestriction.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyTokenRestriction.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -16,11 +15,10 @@ /** * Represents a token restriction. Provided token must match these requirements for successful license or key delivery. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.ContentKeyPolicyTokenRestriction") -@JsonFlatten @Fluent -public class ContentKeyPolicyTokenRestriction extends ContentKeyPolicyRestriction { +public final class ContentKeyPolicyTokenRestriction extends ContentKeyPolicyRestriction { @JsonIgnore private final ClientLogger logger = new ClientLogger(ContentKeyPolicyTokenRestriction.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyUnknownConfiguration.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyUnknownConfiguration.java index 16e3e9cdba7c..5540e043f7fb 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyUnknownConfiguration.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyUnknownConfiguration.java @@ -5,18 +5,16 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; /** Represents a ContentKeyPolicyConfiguration that is unavailable in the current API version. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.ContentKeyPolicyUnknownConfiguration") -@JsonFlatten @Immutable -public class ContentKeyPolicyUnknownConfiguration extends ContentKeyPolicyConfiguration { +public final class ContentKeyPolicyUnknownConfiguration extends ContentKeyPolicyConfiguration { @JsonIgnore private final ClientLogger logger = new ClientLogger(ContentKeyPolicyUnknownConfiguration.class); /** diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyUnknownRestriction.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyUnknownRestriction.java index 403e591daafa..bf4c36a5dae1 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyUnknownRestriction.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyUnknownRestriction.java @@ -5,18 +5,16 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; /** Represents a ContentKeyPolicyRestriction that is unavailable in the current API version. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.ContentKeyPolicyUnknownRestriction") -@JsonFlatten @Immutable -public class ContentKeyPolicyUnknownRestriction extends ContentKeyPolicyRestriction { +public final class ContentKeyPolicyUnknownRestriction extends ContentKeyPolicyRestriction { @JsonIgnore private final ClientLogger logger = new ClientLogger(ContentKeyPolicyUnknownRestriction.class); /** diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyWidevineConfiguration.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyWidevineConfiguration.java index 3a412cfa3d28..46fcf64329d0 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyWidevineConfiguration.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyWidevineConfiguration.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -13,11 +12,10 @@ import com.fasterxml.jackson.annotation.JsonTypeName; /** Specifies a configuration for Widevine licenses. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.ContentKeyPolicyWidevineConfiguration") -@JsonFlatten @Fluent -public class ContentKeyPolicyWidevineConfiguration extends ContentKeyPolicyConfiguration { +public final class ContentKeyPolicyWidevineConfiguration extends ContentKeyPolicyConfiguration { @JsonIgnore private final ClientLogger logger = new ClientLogger(ContentKeyPolicyWidevineConfiguration.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyX509CertificateTokenKey.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyX509CertificateTokenKey.java index 088d4f39980d..29bd553489ea 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyX509CertificateTokenKey.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicyX509CertificateTokenKey.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -14,11 +13,10 @@ import com.fasterxml.jackson.annotation.JsonTypeName; /** Specifies a certificate for token validation. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.ContentKeyPolicyX509CertificateTokenKey") -@JsonFlatten @Fluent -public class ContentKeyPolicyX509CertificateTokenKey extends ContentKeyPolicyRestrictionTokenKey { +public final class ContentKeyPolicyX509CertificateTokenKey extends ContentKeyPolicyRestrictionTokenKey { @JsonIgnore private final ClientLogger logger = new ClientLogger(ContentKeyPolicyX509CertificateTokenKey.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/CopyAudio.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/CopyAudio.java index a15a3e55b410..f8131637686b 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/CopyAudio.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/CopyAudio.java @@ -5,18 +5,16 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; /** A codec flag, which tells the encoder to copy the input audio bitstream. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.CopyAudio") -@JsonFlatten @Fluent -public class CopyAudio extends Codec { +public final class CopyAudio extends Codec { @JsonIgnore private final ClientLogger logger = new ClientLogger(CopyAudio.class); /** {@inheritDoc} */ diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/CopyVideo.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/CopyVideo.java index 9317b0469f43..47ee19b755a1 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/CopyVideo.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/CopyVideo.java @@ -5,18 +5,16 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; /** A codec flag, which tells the encoder to copy the input video bitstream without re-encoding. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.CopyVideo") -@JsonFlatten @Fluent -public class CopyVideo extends Codec { +public final class CopyVideo extends Codec { @JsonIgnore private final ClientLogger logger = new ClientLogger(CopyVideo.class); /** {@inheritDoc} */ diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/FaceDetectorPreset.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/FaceDetectorPreset.java index 36aee3d6d06e..31972c01f924 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/FaceDetectorPreset.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/FaceDetectorPreset.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -17,11 +17,10 @@ * Describes all the settings to be used when analyzing a video in order to detect (and optionally redact) all the faces * present. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.FaceDetectorPreset") -@JsonFlatten @Fluent -public class FaceDetectorPreset extends Preset { +public final class FaceDetectorPreset extends Preset { @JsonIgnore private final ClientLogger logger = new ClientLogger(FaceDetectorPreset.class); /* @@ -66,6 +65,7 @@ public class FaceDetectorPreset extends Preset { * preset itself */ @JsonProperty(value = "experimentalOptions") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map experimentalOptions; /** diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Format.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Format.java index 95284990c07a..0c6eea25c36c 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Format.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Format.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -17,14 +16,13 @@ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", + property = "@odata.type", defaultImpl = Format.class) @JsonTypeName("Format") @JsonSubTypes({ @JsonSubTypes.Type(name = "#Microsoft.Media.ImageFormat", value = ImageFormat.class), @JsonSubTypes.Type(name = "#Microsoft.Media.MultiBitrateFormat", value = MultiBitrateFormat.class) }) -@JsonFlatten @Fluent public class Format { @JsonIgnore private final ClientLogger logger = new ClientLogger(Format.class); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/FromAllInputFile.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/FromAllInputFile.java index 810c56df42f7..c081d210ade4 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/FromAllInputFile.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/FromAllInputFile.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -17,11 +16,10 @@ * property. Generally used with the AudioTrackByAttribute and VideoTrackByAttribute to allow selection of a single * track across a set of input files. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.FromAllInputFile") -@JsonFlatten @Fluent -public class FromAllInputFile extends InputDefinition { +public final class FromAllInputFile extends InputDefinition { @JsonIgnore private final ClientLogger logger = new ClientLogger(FromAllInputFile.class); /** {@inheritDoc} */ diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/FromEachInputFile.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/FromEachInputFile.java index 1dd9dc2d709e..f9a78342be3a 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/FromEachInputFile.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/FromEachInputFile.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -16,11 +15,10 @@ * An InputDefinition that looks at each input file provided to select tracks specified by the IncludedTracks property. * Generally used with the AudioTrackByAttribute and VideoTrackByAttribute to select tracks from each file given. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.FromEachInputFile") -@JsonFlatten @Fluent -public class FromEachInputFile extends InputDefinition { +public final class FromEachInputFile extends InputDefinition { @JsonIgnore private final ClientLogger logger = new ClientLogger(FromEachInputFile.class); /** {@inheritDoc} */ diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H264Layer.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H264Layer.java index 6b0553f46192..c1401f601f10 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H264Layer.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H264Layer.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -17,11 +16,10 @@ * Describes the settings to be used when encoding the input video into a desired output bitrate layer with the H.264 * video codec. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.H264Layer") -@JsonFlatten @Fluent -public class H264Layer extends VideoLayer { +public final class H264Layer extends VideoLayer { @JsonIgnore private final ClientLogger logger = new ClientLogger(H264Layer.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H264Video.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H264Video.java index 391d62ffb8bc..b6bd80543968 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H264Video.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H264Video.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -15,11 +14,10 @@ import java.util.List; /** Describes all the properties for encoding a video with the H.264 codec. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.H264Video") -@JsonFlatten @Fluent -public class H264Video extends Video { +public final class H264Video extends Video { @JsonIgnore private final ClientLogger logger = new ClientLogger(H264Video.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265Layer.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265Layer.java index cd1a8f4df371..18d0771a6d83 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265Layer.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265Layer.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -17,11 +16,10 @@ * Describes the settings to be used when encoding the input video into a desired output bitrate layer with the H.265 * video codec. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.H265Layer") -@JsonFlatten @Fluent -public class H265Layer extends H265VideoLayer { +public final class H265Layer extends H265VideoLayer { @JsonIgnore private final ClientLogger logger = new ClientLogger(H265Layer.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265Video.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265Video.java index ea102774806a..c51b87044592 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265Video.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265Video.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -15,11 +14,10 @@ import java.util.List; /** Describes all the properties for encoding a video with the H.265 codec. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.H265Video") -@JsonFlatten @Fluent -public class H265Video extends Video { +public final class H265Video extends Video { @JsonIgnore private final ClientLogger logger = new ClientLogger(H265Video.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265VideoLayer.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265VideoLayer.java index 2ebabc012d24..f228f67996c9 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265VideoLayer.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265VideoLayer.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -17,11 +16,10 @@ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", + property = "@odata.type", defaultImpl = H265VideoLayer.class) @JsonTypeName("#Microsoft.Media.H265VideoLayer") @JsonSubTypes({@JsonSubTypes.Type(name = "#Microsoft.Media.H265Layer", value = H265Layer.class)}) -@JsonFlatten @Fluent public class H265VideoLayer extends Layer { @JsonIgnore private final ClientLogger logger = new ClientLogger(H265VideoLayer.class); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Image.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Image.java index 92d5a0be4429..ac36ed640bda 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Image.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Image.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -18,14 +17,13 @@ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", + property = "@odata.type", defaultImpl = Image.class) @JsonTypeName("#Microsoft.Media.Image") @JsonSubTypes({ @JsonSubTypes.Type(name = "#Microsoft.Media.JpgImage", value = JpgImage.class), @JsonSubTypes.Type(name = "#Microsoft.Media.PngImage", value = PngImage.class) }) -@JsonFlatten @Fluent public class Image extends Video { @JsonIgnore private final ClientLogger logger = new ClientLogger(Image.class); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ImageFormat.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ImageFormat.java index bb06e5febd14..ca17db52ba26 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ImageFormat.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ImageFormat.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonSubTypes; @@ -16,14 +15,13 @@ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", + property = "@odata.type", defaultImpl = ImageFormat.class) @JsonTypeName("#Microsoft.Media.ImageFormat") @JsonSubTypes({ @JsonSubTypes.Type(name = "#Microsoft.Media.JpgFormat", value = JpgFormat.class), @JsonSubTypes.Type(name = "#Microsoft.Media.PngFormat", value = PngFormat.class) }) -@JsonFlatten @Fluent public class ImageFormat extends Format { @JsonIgnore private final ClientLogger logger = new ClientLogger(ImageFormat.class); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/InputDefinition.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/InputDefinition.java index cc67ec55f3f8..67e7c1e1d831 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/InputDefinition.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/InputDefinition.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -20,7 +19,7 @@ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", + property = "@odata.type", defaultImpl = InputDefinition.class) @JsonTypeName("InputDefinition") @JsonSubTypes({ @@ -28,7 +27,6 @@ @JsonSubTypes.Type(name = "#Microsoft.Media.FromEachInputFile", value = FromEachInputFile.class), @JsonSubTypes.Type(name = "#Microsoft.Media.InputFile", value = InputFile.class) }) -@JsonFlatten @Fluent public class InputDefinition { @JsonIgnore private final ClientLogger logger = new ClientLogger(InputDefinition.class); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/InputFile.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/InputFile.java index 738ecfd6393e..aba34c94c1d8 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/InputFile.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/InputFile.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -14,11 +13,10 @@ import java.util.List; /** An InputDefinition for a single file. TrackSelections are scoped to the file specified. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.InputFile") -@JsonFlatten @Fluent -public class InputFile extends InputDefinition { +public final class InputFile extends InputDefinition { @JsonIgnore private final ClientLogger logger = new ClientLogger(InputFile.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInput.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInput.java index b2094712c44b..9caf77b7e67a 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInput.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInput.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonSubTypes; @@ -16,7 +15,7 @@ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", + property = "@odata.type", defaultImpl = JobInput.class) @JsonTypeName("JobInput") @JsonSubTypes({ @@ -24,7 +23,6 @@ @JsonSubTypes.Type(name = "#Microsoft.Media.JobInputs", value = JobInputs.class), @JsonSubTypes.Type(name = "#Microsoft.Media.JobInputSequence", value = JobInputSequence.class) }) -@JsonFlatten @Immutable public class JobInput { @JsonIgnore private final ClientLogger logger = new ClientLogger(JobInput.class); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputAsset.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputAsset.java index 4dc34aaa0271..984b125127d7 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputAsset.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputAsset.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -14,11 +13,10 @@ import java.util.List; /** Represents an Asset for input into a Job. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.JobInputAsset") -@JsonFlatten @Fluent -public class JobInputAsset extends JobInputClip { +public final class JobInputAsset extends JobInputClip { @JsonIgnore private final ClientLogger logger = new ClientLogger(JobInputAsset.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputClip.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputClip.java index ffe6f6dc71c7..684c66d38551 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputClip.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputClip.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -18,14 +17,13 @@ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", + property = "@odata.type", defaultImpl = JobInputClip.class) @JsonTypeName("#Microsoft.Media.JobInputClip") @JsonSubTypes({ @JsonSubTypes.Type(name = "#Microsoft.Media.JobInputAsset", value = JobInputAsset.class), @JsonSubTypes.Type(name = "#Microsoft.Media.JobInputHttp", value = JobInputHttp.class) }) -@JsonFlatten @Fluent public class JobInputClip extends JobInput { @JsonIgnore private final ClientLogger logger = new ClientLogger(JobInputClip.class); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputHttp.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputHttp.java index ae9679245f97..53b893d9881b 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputHttp.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputHttp.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -14,11 +13,10 @@ import java.util.List; /** Represents HTTPS job input. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.JobInputHttp") -@JsonFlatten @Fluent -public class JobInputHttp extends JobInputClip { +public final class JobInputHttp extends JobInputClip { @JsonIgnore private final ClientLogger logger = new ClientLogger(JobInputHttp.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputSequence.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputSequence.java index 71d9ce30f7df..c3a3268dd4e3 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputSequence.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputSequence.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -17,11 +16,10 @@ * A Sequence contains an ordered list of Clips where each clip is a JobInput. The Sequence will be treated as a single * input. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.JobInputSequence") -@JsonFlatten @Fluent -public class JobInputSequence extends JobInput { +public final class JobInputSequence extends JobInput { @JsonIgnore private final ClientLogger logger = new ClientLogger(JobInputSequence.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputs.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputs.java index c1f095f8012d..381c2b70fc6b 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputs.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputs.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -14,11 +13,10 @@ import java.util.List; /** Describes a list of inputs to a Job. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.JobInputs") -@JsonFlatten @Fluent -public class JobInputs extends JobInput { +public final class JobInputs extends JobInput { @JsonIgnore private final ClientLogger logger = new ClientLogger(JobInputs.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobOutput.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobOutput.java index c70c54267df6..2bddf002aaca 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobOutput.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobOutput.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -18,11 +17,10 @@ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", + property = "@odata.type", defaultImpl = JobOutput.class) @JsonTypeName("JobOutput") @JsonSubTypes({@JsonSubTypes.Type(name = "#Microsoft.Media.JobOutputAsset", value = JobOutputAsset.class)}) -@JsonFlatten @Fluent public class JobOutput { @JsonIgnore private final ClientLogger logger = new ClientLogger(JobOutput.class); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobOutputAsset.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobOutputAsset.java index eb1469a1d702..8b6a6559c9a0 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobOutputAsset.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobOutputAsset.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -13,11 +12,10 @@ import com.fasterxml.jackson.annotation.JsonTypeName; /** Represents an Asset used as a JobOutput. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.JobOutputAsset") -@JsonFlatten @Fluent -public class JobOutputAsset extends JobOutput { +public final class JobOutputAsset extends JobOutput { @JsonIgnore private final ClientLogger logger = new ClientLogger(JobOutputAsset.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JpgFormat.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JpgFormat.java index d2a6863b27c3..025c6514cd5a 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JpgFormat.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JpgFormat.java @@ -5,18 +5,16 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; /** Describes the settings for producing JPEG thumbnails. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.JpgFormat") -@JsonFlatten @Fluent -public class JpgFormat extends ImageFormat { +public final class JpgFormat extends ImageFormat { @JsonIgnore private final ClientLogger logger = new ClientLogger(JpgFormat.class); /** {@inheritDoc} */ diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JpgImage.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JpgImage.java index bf195417d9f8..12a50da2dfe6 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JpgImage.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JpgImage.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -15,11 +14,10 @@ import java.util.List; /** Describes the properties for producing a series of JPEG images from the input video. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.JpgImage") -@JsonFlatten @Fluent -public class JpgImage extends Image { +public final class JpgImage extends Image { @JsonIgnore private final ClientLogger logger = new ClientLogger(JpgImage.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JpgLayer.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JpgLayer.java index f5a1d7827c7e..bbce2164e4e9 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JpgLayer.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JpgLayer.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -13,11 +12,10 @@ import com.fasterxml.jackson.annotation.JsonTypeName; /** Describes the settings to produce a JPEG image from the input video. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.JpgLayer") -@JsonFlatten @Fluent -public class JpgLayer extends Layer { +public final class JpgLayer extends Layer { @JsonIgnore private final ClientLogger logger = new ClientLogger(JpgLayer.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Layer.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Layer.java index b0906100916b..a1b01d4978e7 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Layer.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Layer.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -20,7 +19,7 @@ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", + property = "@odata.type", defaultImpl = Layer.class) @JsonTypeName("Layer") @JsonSubTypes({ @@ -29,7 +28,6 @@ @JsonSubTypes.Type(name = "#Microsoft.Media.JpgLayer", value = JpgLayer.class), @JsonSubTypes.Type(name = "#Microsoft.Media.PngLayer", value = PngLayer.class) }) -@JsonFlatten @Fluent public class Layer { @JsonIgnore private final ClientLogger logger = new ClientLogger(Layer.class); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/LiveEventEncoding.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/LiveEventEncoding.java index 8b08c14cb806..eb61c50430be 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/LiveEventEncoding.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/LiveEventEncoding.java @@ -16,10 +16,11 @@ public final class LiveEventEncoding { @JsonIgnore private final ClientLogger logger = new ClientLogger(LiveEventEncoding.class); /* - * Live event type. When encodingType is set to None, the service simply - * passes through the incoming video and audio layer(s) to the output. When - * encodingType is set to Standard or Premium1080p, a live encoder - * transcodes the incoming stream into multiple bitrates or layers. See + * Live event type. When encodingType is set to PassthroughBasic or + * PassthroughStandard, the service simply passes through the incoming + * video and audio layer(s) to the output. When encodingType is set to + * Standard or Premium1080p, a live encoder transcodes the incoming stream + * into multiple bitrates or layers. See * https://go.microsoft.com/fwlink/?linkid=2095101 for more information. * This property cannot be modified after the live event is created. */ @@ -56,11 +57,11 @@ public final class LiveEventEncoding { private Duration keyFrameInterval; /** - * Get the encodingType property: Live event type. When encodingType is set to None, the service simply passes - * through the incoming video and audio layer(s) to the output. When encodingType is set to Standard or - * Premium1080p, a live encoder transcodes the incoming stream into multiple bitrates or layers. See - * https://go.microsoft.com/fwlink/?linkid=2095101 for more information. This property cannot be modified after the - * live event is created. + * Get the encodingType property: Live event type. When encodingType is set to PassthroughBasic or + * PassthroughStandard, the service simply passes through the incoming video and audio layer(s) to the output. When + * encodingType is set to Standard or Premium1080p, a live encoder transcodes the incoming stream into multiple + * bitrates or layers. See https://go.microsoft.com/fwlink/?linkid=2095101 for more information. This property + * cannot be modified after the live event is created. * * @return the encodingType value. */ @@ -69,11 +70,11 @@ public LiveEventEncodingType encodingType() { } /** - * Set the encodingType property: Live event type. When encodingType is set to None, the service simply passes - * through the incoming video and audio layer(s) to the output. When encodingType is set to Standard or - * Premium1080p, a live encoder transcodes the incoming stream into multiple bitrates or layers. See - * https://go.microsoft.com/fwlink/?linkid=2095101 for more information. This property cannot be modified after the - * live event is created. + * Set the encodingType property: Live event type. When encodingType is set to PassthroughBasic or + * PassthroughStandard, the service simply passes through the incoming video and audio layer(s) to the output. When + * encodingType is set to Standard or Premium1080p, a live encoder transcodes the incoming stream into multiple + * bitrates or layers. See https://go.microsoft.com/fwlink/?linkid=2095101 for more information. This property + * cannot be modified after the live event is created. * * @param encodingType the encodingType value to set. * @return the LiveEventEncoding object itself. diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/LiveEventListResult.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/LiveEventListResult.java index 34c0da46945a..c59030be4c1f 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/LiveEventListResult.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/LiveEventListResult.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The LiveEvent list result. */ +/** LiveEventListResult The LiveEvent list result. */ @Fluent public final class LiveEventListResult { @JsonIgnore private final ClientLogger logger = new ClientLogger(LiveEventListResult.class); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/LiveEvents.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/LiveEvents.java index 0230f2d23472..4abbdece0926 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/LiveEvents.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/LiveEvents.java @@ -18,7 +18,7 @@ public interface LiveEvents { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the LiveEvent list result. + * @return liveEventListResult. */ PagedIterable list(String resourceGroupName, String accountName); @@ -31,7 +31,7 @@ public interface LiveEvents { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the LiveEvent list result. + * @return liveEventListResult. */ PagedIterable list(String resourceGroupName, String accountName, Context context); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/LiveOutputListResult.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/LiveOutputListResult.java index cc8d4f491c28..4f5da1515840 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/LiveOutputListResult.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/LiveOutputListResult.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The LiveOutput list result. */ +/** LiveOutputListResult The LiveOutput list result. */ @Fluent public final class LiveOutputListResult { @JsonIgnore private final ClientLogger logger = new ClientLogger(LiveOutputListResult.class); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/LiveOutputs.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/LiveOutputs.java index 9c4e04353cba..dd17a8ef5dd7 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/LiveOutputs.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/LiveOutputs.java @@ -19,7 +19,7 @@ public interface LiveOutputs { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the LiveOutput list result. + * @return liveOutputListResult. */ PagedIterable list(String resourceGroupName, String accountName, String liveEventName); @@ -33,7 +33,7 @@ public interface LiveOutputs { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the LiveOutput list result. + * @return liveOutputListResult. */ PagedIterable list(String resourceGroupName, String accountName, String liveEventName, Context context); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceIdentity.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceIdentity.java index f839364786eb..f1237914af6d 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceIdentity.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceIdentity.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; import java.util.UUID; @@ -38,6 +39,7 @@ public class MediaServiceIdentity { * The user assigned managed identities. */ @JsonProperty(value = "userAssignedIdentities") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map userAssignedIdentities; /** 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 3f821c400a36..eb376fa4c326 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 @@ -5,68 +5,38 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceProperties; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; import java.util.UUID; /** A Media Services account update. */ -@JsonFlatten @Fluent -public class MediaServiceUpdate { +public final class MediaServiceUpdate { @JsonIgnore private final ClientLogger logger = new ClientLogger(MediaServiceUpdate.class); /* * Resource tags. */ @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /* - * The Managed Identity for the Media Services account. - */ - @JsonProperty(value = "identity") - private MediaServiceIdentity identity; - - /* - * The Media Services account ID. - */ - @JsonProperty(value = "properties.mediaServiceId", access = JsonProperty.Access.WRITE_ONLY) - private UUID mediaServiceId; - - /* - * The storage accounts for this resource. - */ - @JsonProperty(value = "properties.storageAccounts") - private List storageAccounts; - - /* - * The storageAuthentication property. - */ - @JsonProperty(value = "properties.storageAuthentication") - private StorageAuthentication storageAuthentication; - - /* - * The account encryption properties. - */ - @JsonProperty(value = "properties.encryption") - private AccountEncryption encryption; - - /* - * The Key Delivery properties for Media Services account. + * The resource properties. */ - @JsonProperty(value = "properties.keyDelivery") - private KeyDelivery keyDelivery; + @JsonProperty(value = "properties") + private MediaServiceProperties innerProperties; /* - * Whether or not public network access is allowed for resources under the - * Media Services account. + * The Managed Identity for the Media Services account. */ - @JsonProperty(value = "properties.publicNetworkAccess") - private PublicNetworkAccess publicNetworkAccess; + @JsonProperty(value = "identity") + private MediaServiceIdentity identity; /** * Get the tags property: Resource tags. @@ -88,6 +58,15 @@ public MediaServiceUpdate withTags(Map tags) { return this; } + /** + * Get the innerProperties property: The resource properties. + * + * @return the innerProperties value. + */ + private MediaServiceProperties innerProperties() { + return this.innerProperties; + } + /** * Get the identity property: The Managed Identity for the Media Services account. * @@ -114,7 +93,7 @@ public MediaServiceUpdate withIdentity(MediaServiceIdentity identity) { * @return the mediaServiceId value. */ public UUID mediaServiceId() { - return this.mediaServiceId; + return this.innerProperties() == null ? null : this.innerProperties().mediaServiceId(); } /** @@ -123,7 +102,7 @@ public UUID mediaServiceId() { * @return the storageAccounts value. */ public List storageAccounts() { - return this.storageAccounts; + return this.innerProperties() == null ? null : this.innerProperties().storageAccounts(); } /** @@ -133,7 +112,10 @@ public List storageAccounts() { * @return the MediaServiceUpdate object itself. */ public MediaServiceUpdate withStorageAccounts(List storageAccounts) { - this.storageAccounts = storageAccounts; + if (this.innerProperties() == null) { + this.innerProperties = new MediaServiceProperties(); + } + this.innerProperties().withStorageAccounts(storageAccounts); return this; } @@ -143,7 +125,7 @@ public MediaServiceUpdate withStorageAccounts(List storageAccoun * @return the storageAuthentication value. */ public StorageAuthentication storageAuthentication() { - return this.storageAuthentication; + return this.innerProperties() == null ? null : this.innerProperties().storageAuthentication(); } /** @@ -153,7 +135,10 @@ public StorageAuthentication storageAuthentication() { * @return the MediaServiceUpdate object itself. */ public MediaServiceUpdate withStorageAuthentication(StorageAuthentication storageAuthentication) { - this.storageAuthentication = storageAuthentication; + if (this.innerProperties() == null) { + this.innerProperties = new MediaServiceProperties(); + } + this.innerProperties().withStorageAuthentication(storageAuthentication); return this; } @@ -163,7 +148,7 @@ public MediaServiceUpdate withStorageAuthentication(StorageAuthentication storag * @return the encryption value. */ public AccountEncryption encryption() { - return this.encryption; + return this.innerProperties() == null ? null : this.innerProperties().encryption(); } /** @@ -173,7 +158,10 @@ public AccountEncryption encryption() { * @return the MediaServiceUpdate object itself. */ public MediaServiceUpdate withEncryption(AccountEncryption encryption) { - this.encryption = encryption; + if (this.innerProperties() == null) { + this.innerProperties = new MediaServiceProperties(); + } + this.innerProperties().withEncryption(encryption); return this; } @@ -183,7 +171,7 @@ public MediaServiceUpdate withEncryption(AccountEncryption encryption) { * @return the keyDelivery value. */ public KeyDelivery keyDelivery() { - return this.keyDelivery; + return this.innerProperties() == null ? null : this.innerProperties().keyDelivery(); } /** @@ -193,7 +181,10 @@ public KeyDelivery keyDelivery() { * @return the MediaServiceUpdate object itself. */ public MediaServiceUpdate withKeyDelivery(KeyDelivery keyDelivery) { - this.keyDelivery = keyDelivery; + if (this.innerProperties() == null) { + this.innerProperties = new MediaServiceProperties(); + } + this.innerProperties().withKeyDelivery(keyDelivery); return this; } @@ -204,7 +195,7 @@ public MediaServiceUpdate withKeyDelivery(KeyDelivery keyDelivery) { * @return the publicNetworkAccess value. */ public PublicNetworkAccess publicNetworkAccess() { - return this.publicNetworkAccess; + return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); } /** @@ -215,7 +206,10 @@ public PublicNetworkAccess publicNetworkAccess() { * @return the MediaServiceUpdate object itself. */ public MediaServiceUpdate withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; + if (this.innerProperties() == null) { + this.innerProperties = new MediaServiceProperties(); + } + this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); return this; } @@ -225,17 +219,11 @@ public MediaServiceUpdate withPublicNetworkAccess(PublicNetworkAccess publicNetw * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } if (identity() != null) { identity().validate(); } - if (storageAccounts() != null) { - storageAccounts().forEach(e -> e.validate()); - } - if (encryption() != null) { - encryption().validate(); - } - if (keyDelivery() != null) { - keyDelivery().validate(); - } } } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Mp4Format.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Mp4Format.java index 97c39c20a2d3..8e3f848c6a51 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Mp4Format.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Mp4Format.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -13,11 +12,10 @@ import java.util.List; /** Describes the properties for an output ISO MP4 file. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.Mp4Format") -@JsonFlatten @Fluent -public class Mp4Format extends MultiBitrateFormat { +public final class Mp4Format extends MultiBitrateFormat { @JsonIgnore private final ClientLogger logger = new ClientLogger(Mp4Format.class); /** {@inheritDoc} */ diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MultiBitrateFormat.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MultiBitrateFormat.java index 3c4adb7e0ec8..8e0792cd37d4 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MultiBitrateFormat.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MultiBitrateFormat.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -22,14 +21,13 @@ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", + property = "@odata.type", defaultImpl = MultiBitrateFormat.class) @JsonTypeName("#Microsoft.Media.MultiBitrateFormat") @JsonSubTypes({ @JsonSubTypes.Type(name = "#Microsoft.Media.Mp4Format", value = Mp4Format.class), @JsonSubTypes.Type(name = "#Microsoft.Media.TransportStreamFormat", value = TransportStreamFormat.class) }) -@JsonFlatten @Fluent public class MultiBitrateFormat extends Format { @JsonIgnore private final ClientLogger logger = new ClientLogger(MultiBitrateFormat.class); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Overlay.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Overlay.java index 2f7d59a501e4..150ac40a21a5 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Overlay.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Overlay.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -18,14 +17,13 @@ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", + property = "@odata.type", defaultImpl = Overlay.class) @JsonTypeName("Overlay") @JsonSubTypes({ @JsonSubTypes.Type(name = "#Microsoft.Media.AudioOverlay", value = AudioOverlay.class), @JsonSubTypes.Type(name = "#Microsoft.Media.VideoOverlay", value = VideoOverlay.class) }) -@JsonFlatten @Fluent public class Overlay { @JsonIgnore private final ClientLogger logger = new ClientLogger(Overlay.class); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PngFormat.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PngFormat.java index 1ebf63f4de20..9ad20d86e08c 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PngFormat.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PngFormat.java @@ -5,18 +5,16 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; /** Describes the settings for producing PNG thumbnails. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.PngFormat") -@JsonFlatten @Fluent -public class PngFormat extends ImageFormat { +public final class PngFormat extends ImageFormat { @JsonIgnore private final ClientLogger logger = new ClientLogger(PngFormat.class); /** {@inheritDoc} */ diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PngImage.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PngImage.java index 0ba7948b9c49..7c78db011b69 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PngImage.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PngImage.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -15,11 +14,10 @@ import java.util.List; /** Describes the properties for producing a series of PNG images from the input video. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.PngImage") -@JsonFlatten @Fluent -public class PngImage extends Image { +public final class PngImage extends Image { @JsonIgnore private final ClientLogger logger = new ClientLogger(PngImage.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PngLayer.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PngLayer.java index a196c3894e66..79fd50786984 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PngLayer.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PngLayer.java @@ -5,18 +5,16 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; /** Describes the settings to produce a PNG image from the input video. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.PngLayer") -@JsonFlatten @Fluent -public class PngLayer extends Layer { +public final class PngLayer extends Layer { @JsonIgnore private final ClientLogger logger = new ClientLogger(PngLayer.class); /** {@inheritDoc} */ diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Preset.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Preset.java index 7c4707e41542..bd9f2efe6fed 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Preset.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Preset.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonSubTypes; @@ -18,7 +17,7 @@ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", + property = "@odata.type", defaultImpl = Preset.class) @JsonTypeName("Preset") @JsonSubTypes({ @@ -29,7 +28,6 @@ value = BuiltInStandardEncoderPreset.class), @JsonSubTypes.Type(name = "#Microsoft.Media.StandardEncoderPreset", value = StandardEncoderPreset.class) }) -@JsonFlatten @Immutable public class Preset { @JsonIgnore private final ClientLogger logger = new ClientLogger(Preset.class); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/SelectAudioTrackByAttribute.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/SelectAudioTrackByAttribute.java index c2127ec47990..db8151c71f29 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/SelectAudioTrackByAttribute.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/SelectAudioTrackByAttribute.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -13,11 +12,10 @@ import com.fasterxml.jackson.annotation.JsonTypeName; /** Select audio tracks from the input by specifying an attribute and an attribute filter. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.SelectAudioTrackByAttribute") -@JsonFlatten @Fluent -public class SelectAudioTrackByAttribute extends AudioTrackDescriptor { +public final class SelectAudioTrackByAttribute extends AudioTrackDescriptor { @JsonIgnore private final ClientLogger logger = new ClientLogger(SelectAudioTrackByAttribute.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/SelectAudioTrackById.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/SelectAudioTrackById.java index 1144ed6cc79b..d8fbaa789ac3 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/SelectAudioTrackById.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/SelectAudioTrackById.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -13,11 +12,10 @@ import com.fasterxml.jackson.annotation.JsonTypeName; /** Select audio tracks from the input by specifying a track identifier. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.SelectAudioTrackById") -@JsonFlatten @Fluent -public class SelectAudioTrackById extends AudioTrackDescriptor { +public final class SelectAudioTrackById extends AudioTrackDescriptor { @JsonIgnore private final ClientLogger logger = new ClientLogger(SelectAudioTrackById.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/SelectVideoTrackByAttribute.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/SelectVideoTrackByAttribute.java index e09ba68edc56..df23e77b0b43 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/SelectVideoTrackByAttribute.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/SelectVideoTrackByAttribute.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -13,11 +12,10 @@ import com.fasterxml.jackson.annotation.JsonTypeName; /** Select video tracks from the input by specifying an attribute and an attribute filter. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.SelectVideoTrackByAttribute") -@JsonFlatten @Fluent -public class SelectVideoTrackByAttribute extends VideoTrackDescriptor { +public final class SelectVideoTrackByAttribute extends VideoTrackDescriptor { @JsonIgnore private final ClientLogger logger = new ClientLogger(SelectVideoTrackByAttribute.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/SelectVideoTrackById.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/SelectVideoTrackById.java index d472e7e4ba6b..e11112628035 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/SelectVideoTrackById.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/SelectVideoTrackById.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -13,11 +12,10 @@ import com.fasterxml.jackson.annotation.JsonTypeName; /** Select video tracks from the input by specifying a track identifier. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.SelectVideoTrackById") -@JsonFlatten @Fluent -public class SelectVideoTrackById extends VideoTrackDescriptor { +public final class SelectVideoTrackById extends VideoTrackDescriptor { @JsonIgnore private final ClientLogger logger = new ClientLogger(SelectVideoTrackById.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StandardEncoderPreset.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StandardEncoderPreset.java index c27b028349e0..969ca5b2205c 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StandardEncoderPreset.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StandardEncoderPreset.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -14,11 +13,10 @@ import java.util.List; /** Describes all the settings to be used when encoding the input video with the Standard Encoder. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.StandardEncoderPreset") -@JsonFlatten @Fluent -public class StandardEncoderPreset extends Preset { +public final class StandardEncoderPreset extends Preset { @JsonIgnore private final ClientLogger logger = new ClientLogger(StandardEncoderPreset.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingEndpoint.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingEndpoint.java index 937a8ff008b2..f871c81d39ca 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingEndpoint.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingEndpoint.java @@ -68,7 +68,7 @@ public interface StreamingEndpoint { * * @return the scaleUnits value. */ - Integer scaleUnits(); + int scaleUnits(); /** * Gets the availabilitySetName property: This feature is deprecated, do not set a value for this property. @@ -291,7 +291,7 @@ interface WithScaleUnits { * @param scaleUnits The number of scale units. Use the Scale operation to adjust this value. * @return the next definition stage. */ - WithCreate withScaleUnits(Integer scaleUnits); + WithCreate withScaleUnits(int scaleUnits); } /** The stage of the StreamingEndpoint definition allowing to specify availabilitySetName. */ interface WithAvailabilitySetName { @@ -452,7 +452,7 @@ interface WithScaleUnits { * @param scaleUnits The number of scale units. Use the Scale operation to adjust this value. * @return the next definition stage. */ - Update withScaleUnits(Integer scaleUnits); + Update withScaleUnits(int scaleUnits); } /** The stage of the StreamingEndpoint update allowing to specify availabilitySetName. */ interface WithAvailabilitySetName { diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingEndpointListResult.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingEndpointListResult.java index 8497ce2008df..066107b4bbf9 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingEndpointListResult.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingEndpointListResult.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The streaming endpoint list result. */ +/** StreamingEndpointListResult The streaming endpoint list result. */ @Fluent public final class StreamingEndpointListResult { @JsonIgnore private final ClientLogger logger = new ClientLogger(StreamingEndpointListResult.class); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingEndpoints.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingEndpoints.java index 112873206327..5dfeab329560 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingEndpoints.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingEndpoints.java @@ -18,7 +18,7 @@ public interface StreamingEndpoints { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the streaming endpoint list result. + * @return streamingEndpointListResult. */ PagedIterable list(String resourceGroupName, String accountName); @@ -31,7 +31,7 @@ public interface StreamingEndpoints { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the streaming endpoint list result. + * @return streamingEndpointListResult. */ PagedIterable list(String resourceGroupName, String accountName, Context context); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TrackDescriptor.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TrackDescriptor.java index cc25cc4288bd..d5ffa559b8ac 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TrackDescriptor.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TrackDescriptor.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonSubTypes; @@ -19,14 +18,13 @@ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", + property = "@odata.type", defaultImpl = TrackDescriptor.class) @JsonTypeName("TrackDescriptor") @JsonSubTypes({ @JsonSubTypes.Type(name = "#Microsoft.Media.AudioTrackDescriptor", value = AudioTrackDescriptor.class), @JsonSubTypes.Type(name = "#Microsoft.Media.VideoTrackDescriptor", value = VideoTrackDescriptor.class) }) -@JsonFlatten @Immutable public class TrackDescriptor { @JsonIgnore private final ClientLogger logger = new ClientLogger(TrackDescriptor.class); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TransportStreamFormat.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TransportStreamFormat.java index 994ea06e91e0..f176f26c435d 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TransportStreamFormat.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TransportStreamFormat.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -13,11 +12,10 @@ import java.util.List; /** Describes the properties for generating an MPEG-2 Transport Stream (ISO/IEC 13818-1) output video file(s). */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.TransportStreamFormat") -@JsonFlatten @Fluent -public class TransportStreamFormat extends MultiBitrateFormat { +public final class TransportStreamFormat extends MultiBitrateFormat { @JsonIgnore private final ClientLogger logger = new ClientLogger(TransportStreamFormat.class); /** {@inheritDoc} */ diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/UtcClipTime.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/UtcClipTime.java index adb7ac0573c2..3e76958ba00e 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/UtcClipTime.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/UtcClipTime.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -17,11 +16,10 @@ * Specifies the clip time as a Utc time position in the media file. The Utc time can point to a different position * depending on whether the media file starts from a timestamp of zero or not. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.UtcClipTime") -@JsonFlatten @Fluent -public class UtcClipTime extends ClipTime { +public final class UtcClipTime extends ClipTime { @JsonIgnore private final ClientLogger logger = new ClientLogger(UtcClipTime.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Video.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Video.java index d782e13d5f17..11a0d3b3f54c 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Video.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Video.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -18,7 +17,7 @@ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", + property = "@odata.type", defaultImpl = Video.class) @JsonTypeName("#Microsoft.Media.Video") @JsonSubTypes({ @@ -26,7 +25,6 @@ @JsonSubTypes.Type(name = "#Microsoft.Media.Image", value = Image.class), @JsonSubTypes.Type(name = "#Microsoft.Media.H264Video", value = H264Video.class) }) -@JsonFlatten @Fluent public class Video extends Codec { @JsonIgnore private final ClientLogger logger = new ClientLogger(Video.class); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoAnalyzerPreset.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoAnalyzerPreset.java index f86b54e1f7df..a67e6d790676 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoAnalyzerPreset.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoAnalyzerPreset.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -17,11 +16,10 @@ * A video analyzer preset that extracts insights (rich metadata) from both audio and video, and outputs a JSON format * file. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.VideoAnalyzerPreset") -@JsonFlatten @Fluent -public class VideoAnalyzerPreset extends AudioAnalyzerPreset { +public final class VideoAnalyzerPreset extends AudioAnalyzerPreset { @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoAnalyzerPreset.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoLayer.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoLayer.java index 82c662fe3c1a..28be88aba047 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoLayer.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoLayer.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -17,11 +16,10 @@ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", + property = "@odata.type", defaultImpl = VideoLayer.class) @JsonTypeName("#Microsoft.Media.VideoLayer") @JsonSubTypes({@JsonSubTypes.Type(name = "#Microsoft.Media.H264Layer", value = H264Layer.class)}) -@JsonFlatten @Fluent public class VideoLayer extends Layer { @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoLayer.class); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoOverlay.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoOverlay.java index 359dbddbf92e..97ea76c15d62 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoOverlay.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoOverlay.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -14,11 +13,10 @@ import java.time.Duration; /** Describes the properties of a video overlay. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") @JsonTypeName("#Microsoft.Media.VideoOverlay") -@JsonFlatten @Fluent -public class VideoOverlay extends Overlay { +public final class VideoOverlay extends Overlay { @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoOverlay.class); /* diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoTrackDescriptor.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoTrackDescriptor.java index 7703b9f462dd..a051c0f55e09 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoTrackDescriptor.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoTrackDescriptor.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonSubTypes; @@ -16,7 +15,7 @@ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", + property = "@odata.type", defaultImpl = VideoTrackDescriptor.class) @JsonTypeName("#Microsoft.Media.VideoTrackDescriptor") @JsonSubTypes({ @@ -25,7 +24,6 @@ value = SelectVideoTrackByAttribute.class), @JsonSubTypes.Type(name = "#Microsoft.Media.SelectVideoTrackById", value = SelectVideoTrackById.class) }) -@JsonFlatten @Immutable public class VideoTrackDescriptor extends TrackDescriptor { @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoTrackDescriptor.class); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AccountFiltersGetSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AccountFiltersGetSamples.java deleted file mode 100644 index c7feaa5d7ea5..000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AccountFiltersGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices; - -import com.azure.core.util.Context; - -/** Samples for AccountFilters Get. */ -public final class AccountFiltersGetSamples { - /** - * Sample code: Get an Account Filter by name. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void getAnAccountFilterByName( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager - .accountFilters() - .getWithResponse("contoso", "contosomedia", "accountFilterWithTrack", Context.NONE); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AccountFiltersListSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AccountFiltersListSamples.java deleted file mode 100644 index 2d17b703e399..000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AccountFiltersListSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices; - -import com.azure.core.util.Context; - -/** Samples for AccountFilters List. */ -public final class AccountFiltersListSamples { - /** - * Sample code: List all Account Filters. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void listAllAccountFilters( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager.accountFilters().list("contoso", "contosomedia", Context.NONE); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetFiltersListSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetFiltersListSamples.java deleted file mode 100644 index 07a1ac00b139..000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetFiltersListSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices; - -import com.azure.core.util.Context; - -/** Samples for AssetFilters List. */ -public final class AssetFiltersListSamples { - /** - * Sample code: List all Asset Filters. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void listAllAssetFilters( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager.assetFilters().list("contoso", "contosomedia", "ClimbingMountRainer", Context.NONE); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsDeleteSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsDeleteSamples.java deleted file mode 100644 index 69fa0af2748e..000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsDeleteSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices; - -import com.azure.core.util.Context; - -/** Samples for Assets Delete. */ -public final class AssetsDeleteSamples { - /** - * Sample code: Delete an Asset. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void deleteAnAsset( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager.assets().deleteWithResponse("contoso", "contosomedia", "ClimbingMountAdams", Context.NONE); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsGetSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsGetSamples.java deleted file mode 100644 index 8289b48f5334..000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsGetSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices; - -import com.azure.core.util.Context; - -/** Samples for Assets Get. */ -public final class AssetsGetSamples { - /** - * Sample code: Get an Asset by name. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void getAnAssetByName( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager.assets().getWithResponse("contoso", "contosomedia", "ClimbingMountAdams", Context.NONE); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsListSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsListSamples.java deleted file mode 100644 index c1f8ec30b3d8..000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsListSamples.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices; - -import com.azure.core.util.Context; - -/** Samples for Assets List. */ -public final class AssetsListSamples { - /** - * Sample code: List Asset ordered by date. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void listAssetOrderedByDate( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager.assets().list("contoso", "contosomedia", null, null, "properties/created", Context.NONE); - } - - /** - * Sample code: List Asset created in a date range. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void listAssetCreatedInADateRange( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager - .assets() - .list( - "contoso", - "contosomedia", - "properties/created gt 2012-06-01 and properties/created lt 2013-07-01", - null, - "properties/created", - Context.NONE); - } - - /** - * Sample code: List all Assets. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void listAllAssets( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager.assets().list("contoso", "contosomedia", null, null, null, Context.NONE); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/ContentKeyPoliciesCreateOrUpdateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/ContentKeyPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index 59a430834328..000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/ContentKeyPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices; - -import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyConfiguration; -import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyOption; -import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyRestriction; -import java.util.Arrays; - -/** Samples for ContentKeyPolicies CreateOrUpdate. */ -public final class ContentKeyPoliciesCreateOrUpdateSamples { - /** - * Sample code: Creates a Content Key Policy with multiple options. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void createsAContentKeyPolicyWithMultipleOptions( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager - .contentKeyPolicies() - .define("PolicyCreatedWithMultipleOptions") - .withExistingMediaService("contoso", "contosomedia") - .withDescription("ArmPolicyDescription") - .withOptions( - Arrays - .asList( - new ContentKeyPolicyOption() - .withName("ClearKeyOption") - .withConfiguration(new ContentKeyPolicyConfiguration()) - .withRestriction(new ContentKeyPolicyRestriction()), - new ContentKeyPolicyOption() - .withName("widevineoption") - .withConfiguration(new ContentKeyPolicyConfiguration()) - .withRestriction(new ContentKeyPolicyRestriction()))) - .create(); - } - - /** - * Sample code: Creates a Content Key Policy with ClearKey option and Token Restriction. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void createsAContentKeyPolicyWithClearKeyOptionAndTokenRestriction( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager - .contentKeyPolicies() - .define("PolicyWithClearKeyOptionAndSwtTokenRestriction") - .withExistingMediaService("contoso", "contosomedia") - .withDescription("ArmPolicyDescription") - .withOptions( - Arrays - .asList( - new ContentKeyPolicyOption() - .withName("ClearKeyOption") - .withConfiguration(new ContentKeyPolicyConfiguration()) - .withRestriction(new ContentKeyPolicyRestriction()))) - .create(); - } - - /** - * Sample code: Creates a Content Key Policy with PlayReady option and Open Restriction. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void createsAContentKeyPolicyWithPlayReadyOptionAndOpenRestriction( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager - .contentKeyPolicies() - .define("PolicyWithPlayReadyOptionAndOpenRestriction") - .withExistingMediaService("contoso", "contosomedia") - .withDescription("ArmPolicyDescription") - .withOptions( - Arrays - .asList( - new ContentKeyPolicyOption() - .withName("ArmPolicyOptionName") - .withConfiguration(new ContentKeyPolicyConfiguration()) - .withRestriction(new ContentKeyPolicyRestriction()))) - .create(); - } - - /** - * Sample code: Creates a Content Key Policy with Widevine option and Token Restriction. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void createsAContentKeyPolicyWithWidevineOptionAndTokenRestriction( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager - .contentKeyPolicies() - .define("PolicyWithWidevineOptionAndJwtTokenRestriction") - .withExistingMediaService("contoso", "contosomedia") - .withDescription("ArmPolicyDescription") - .withOptions( - Arrays - .asList( - new ContentKeyPolicyOption() - .withName("widevineoption") - .withConfiguration(new ContentKeyPolicyConfiguration()) - .withRestriction(new ContentKeyPolicyRestriction()))) - .create(); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/JobsGetSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/JobsGetSamples.java deleted file mode 100644 index 2cf0ac923c42..000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/JobsGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices; - -import com.azure.core.util.Context; - -/** Samples for Jobs Get. */ -public final class JobsGetSamples { - /** - * Sample code: Get a Job by name. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void getAJobByName( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager - .jobs() - .getWithResponse("contosoresources", "contosomedia", "exampleTransform", "job1", Context.NONE); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsAllocateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsAllocateSamples.java deleted file mode 100644 index 70254f8771d3..000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsAllocateSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices; - -import com.azure.core.util.Context; - -/** Samples for LiveEvents Allocate. */ -public final class LiveEventsAllocateSamples { - /** - * Sample code: Allocate a LiveEvent. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void allocateALiveEvent( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager.liveEvents().allocate("mediaresources", "slitestmedia10", "myLiveEvent1", Context.NONE); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsDeleteSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsDeleteSamples.java deleted file mode 100644 index 7f789bb3c7e4..000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsDeleteSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices; - -import com.azure.core.util.Context; - -/** Samples for LiveEvents Delete. */ -public final class LiveEventsDeleteSamples { - /** - * Sample code: Delete a LiveEvent. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void deleteALiveEvent( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager.liveEvents().delete("mediaresources", "slitestmedia10", "myLiveEvent1", Context.NONE); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsGetSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsGetSamples.java deleted file mode 100644 index 1aca69ca63ed..000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices; - -import com.azure.core.util.Context; - -/** Samples for LiveEvents Get. */ -public final class LiveEventsGetSamples { - /** - * Sample code: Get a LiveEvent by name. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void getALiveEventByName( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager - .liveEvents() - .getWithResponse("mediaresources", "slitestmedia10", "myLiveEvent1", Context.NONE); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsListSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsListSamples.java deleted file mode 100644 index 69f95a2ba2e9..000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsListSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices; - -import com.azure.core.util.Context; - -/** Samples for LiveEvents List. */ -public final class LiveEventsListSamples { - /** - * Sample code: List all LiveEvents. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void listAllLiveEvents( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager.liveEvents().list("mediaresources", "slitestmedia10", Context.NONE); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsResetSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsResetSamples.java deleted file mode 100644 index aa35034f2867..000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsResetSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices; - -import com.azure.core.util.Context; - -/** Samples for LiveEvents Reset. */ -public final class LiveEventsResetSamples { - /** - * Sample code: Reset a LiveEvent. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void resetALiveEvent( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager.liveEvents().reset("mediaresources", "slitestmedia10", "myLiveEvent1", Context.NONE); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsStartSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsStartSamples.java deleted file mode 100644 index cc0d92d3e16b..000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsStartSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices; - -import com.azure.core.util.Context; - -/** Samples for LiveEvents Start. */ -public final class LiveEventsStartSamples { - /** - * Sample code: Start a LiveEvent. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void startALiveEvent( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager.liveEvents().start("mediaresources", "slitestmedia10", "myLiveEvent1", Context.NONE); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveOutputsDeleteSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveOutputsDeleteSamples.java deleted file mode 100644 index 32ebfe586d23..000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveOutputsDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices; - -import com.azure.core.util.Context; - -/** Samples for LiveOutputs Delete. */ -public final class LiveOutputsDeleteSamples { - /** - * Sample code: Delete a LiveOutput. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void deleteALiveOutput( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager - .liveOutputs() - .delete("mediaresources", "slitestmedia10", "myLiveEvent1", "myLiveOutput1", Context.NONE); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveOutputsListSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveOutputsListSamples.java deleted file mode 100644 index 0864e5d5689b..000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveOutputsListSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices; - -import com.azure.core.util.Context; - -/** Samples for LiveOutputs List. */ -public final class LiveOutputsListSamples { - /** - * Sample code: List all LiveOutputs. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void listAllLiveOutputs( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager.liveOutputs().list("mediaresources", "slitestmedia10", "myLiveEvent1", Context.NONE); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/OperationsListSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/OperationsListSamples.java deleted file mode 100644 index 5098119d366c..000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/OperationsListSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices; - -import com.azure.core.util.Context; - -/** Samples for Operations List. */ -public final class OperationsListSamples { - /** - * Sample code: List Operations. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void listOperations( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager.operations().listWithResponse(Context.NONE); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/PrivateLinkResourcesGetSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/PrivateLinkResourcesGetSamples.java deleted file mode 100644 index c0984344b5da..000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/PrivateLinkResourcesGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices; - -import com.azure.core.util.Context; - -/** Samples for PrivateLinkResources Get. */ -public final class PrivateLinkResourcesGetSamples { - /** - * Sample code: Get details of a group ID. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void getDetailsOfAGroupID( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager - .privateLinkResources() - .getWithResponse("contoso", "contososports", "keydelivery", Context.NONE); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/PrivateLinkResourcesListSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/PrivateLinkResourcesListSamples.java deleted file mode 100644 index 38551e97d580..000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/PrivateLinkResourcesListSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices; - -import com.azure.core.util.Context; - -/** Samples for PrivateLinkResources List. */ -public final class PrivateLinkResourcesListSamples { - /** - * Sample code: Get list of all group IDs. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void getListOfAllGroupIDs( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager.privateLinkResources().listWithResponse("contoso", "contososports", Context.NONE); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsDeleteSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsDeleteSamples.java deleted file mode 100644 index 5c75f37fa507..000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices; - -import com.azure.core.util.Context; - -/** Samples for StreamingEndpoints Delete. */ -public final class StreamingEndpointsDeleteSamples { - /** - * Sample code: Delete a streaming endpoint. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void deleteAStreamingEndpoint( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager - .streamingEndpoints() - .delete("mediaresources", "slitestmedia10", "myStreamingEndpoint1", Context.NONE); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsListSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsListSamples.java deleted file mode 100644 index 44f767dadd7c..000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsListSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices; - -import com.azure.core.util.Context; - -/** Samples for StreamingEndpoints List. */ -public final class StreamingEndpointsListSamples { - /** - * Sample code: List all streaming endpoints. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void listAllStreamingEndpoints( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager.streamingEndpoints().list("mediaresources", "slitestmedia10", Context.NONE); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsStartSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsStartSamples.java deleted file mode 100644 index de741f5e6570..000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsStartSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices; - -import com.azure.core.util.Context; - -/** Samples for StreamingEndpoints Start. */ -public final class StreamingEndpointsStartSamples { - /** - * Sample code: Start a streaming endpoint. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void startAStreamingEndpoint( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager - .streamingEndpoints() - .start("mediaresources", "slitestmedia10", "myStreamingEndpoint1", Context.NONE); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsStopSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsStopSamples.java deleted file mode 100644 index f638765f10a6..000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsStopSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices; - -import com.azure.core.util.Context; - -/** Samples for StreamingEndpoints Stop. */ -public final class StreamingEndpointsStopSamples { - /** - * Sample code: Stop a streaming endpoint. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void stopAStreamingEndpoint( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager - .streamingEndpoints() - .stop("mediaresources", "slitestmedia10", "myStreamingEndpoint1", Context.NONE); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingLocatorsListSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingLocatorsListSamples.java deleted file mode 100644 index d3530fe05175..000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingLocatorsListSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices; - -import com.azure.core.util.Context; - -/** Samples for StreamingLocators List. */ -public final class StreamingLocatorsListSamples { - /** - * Sample code: Lists Streaming Locators. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void listsStreamingLocators( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager.streamingLocators().list("contoso", "contosomedia", null, null, null, Context.NONE); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingPoliciesGetSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingPoliciesGetSamples.java deleted file mode 100644 index 000a8cbdcbca..000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingPoliciesGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices; - -import com.azure.core.util.Context; - -/** Samples for StreamingPolicies Get. */ -public final class StreamingPoliciesGetSamples { - /** - * Sample code: Get a Streaming Policy by name. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void getAStreamingPolicyByName( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager - .streamingPolicies() - .getWithResponse("contoso", "contosomedia", "clearStreamingPolicy", Context.NONE); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingPoliciesListSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingPoliciesListSamples.java deleted file mode 100644 index a86d22a0b68a..000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingPoliciesListSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices; - -import com.azure.core.util.Context; - -/** Samples for StreamingPolicies List. */ -public final class StreamingPoliciesListSamples { - /** - * Sample code: Lists Streaming Policies. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void listsStreamingPolicies( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager.streamingPolicies().list("contoso", "contosomedia", null, null, null, Context.NONE); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/TransformsCreateOrUpdateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/TransformsCreateOrUpdateSamples.java deleted file mode 100644 index 5fe059ca3c0d..000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/TransformsCreateOrUpdateSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices; - -import com.azure.resourcemanager.mediaservices.models.Preset; -import com.azure.resourcemanager.mediaservices.models.TransformOutput; -import java.util.Arrays; - -/** Samples for Transforms CreateOrUpdate. */ -public final class TransformsCreateOrUpdateSamples { - /** - * Sample code: Create or update a Transform. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void createOrUpdateATransform( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager - .transforms() - .define("createdTransform") - .withExistingMediaService("contosoresources", "contosomedia") - .withDescription("Example Transform to illustrate create and update.") - .withOutputs(Arrays.asList(new TransformOutput().withPreset(new Preset()))) - .create(); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/TransformsDeleteSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/TransformsDeleteSamples.java deleted file mode 100644 index 6fa2cd64e5ba..000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/TransformsDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices; - -import com.azure.core.util.Context; - -/** Samples for Transforms Delete. */ -public final class TransformsDeleteSamples { - /** - * Sample code: Delete a Transform. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void deleteATransform( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager - .transforms() - .deleteWithResponse("contosoresources", "contosomedia", "sampleTransform", Context.NONE); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/TransformsGetSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/TransformsGetSamples.java deleted file mode 100644 index b0e746fb89ea..000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/TransformsGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices; - -import com.azure.core.util.Context; - -/** Samples for Transforms Get. */ -public final class TransformsGetSamples { - /** - * Sample code: Get a Transform by name. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void getATransformByName( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager - .transforms() - .getWithResponse("contosoresources", "contosomedia", "sampleTransform", Context.NONE); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/TransformsUpdateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/TransformsUpdateSamples.java deleted file mode 100644 index 012015f4e0ae..000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/TransformsUpdateSamples.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.mediaservices.models.Preset; -import com.azure.resourcemanager.mediaservices.models.Priority; -import com.azure.resourcemanager.mediaservices.models.Transform; -import com.azure.resourcemanager.mediaservices.models.TransformOutput; -import java.util.Arrays; - -/** Samples for Transforms Update. */ -public final class TransformsUpdateSamples { - /** - * Sample code: Update a Transform. - * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. - */ - public static void updateATransform( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - Transform resource = - mediaServicesManager - .transforms() - .getWithResponse("contosoresources", "contosomedia", "transformToUpdate", Context.NONE) - .getValue(); - resource - .update() - .withDescription("Example transform to illustrate update.") - .withOutputs( - Arrays.asList(new TransformOutput().withRelativePriority(Priority.HIGH).withPreset(new Preset()))) - .apply(); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AccountFiltersCreateOrUpdateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AccountFiltersCreateOrUpdateSamples.java similarity index 89% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AccountFiltersCreateOrUpdateSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AccountFiltersCreateOrUpdateSamples.java index 4aa9600ae13e..da108b47ab2d 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AccountFiltersCreateOrUpdateSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AccountFiltersCreateOrUpdateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.resourcemanager.mediaservices.models.FilterTrackPropertyCompareOperation; import com.azure.resourcemanager.mediaservices.models.FilterTrackPropertyCondition; @@ -14,14 +14,16 @@ /** Samples for AccountFilters CreateOrUpdate. */ public final class AccountFiltersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accountFilters-create.json + */ /** * Sample code: Create an Account Filter. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void createAnAccountFilter( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + public static void createAnAccountFilter(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .accountFilters() .define("newAccountFilter") .withExistingMediaService("contoso", "contosomedia") diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AccountFiltersDeleteSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AccountFiltersDeleteSamples.java similarity index 55% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AccountFiltersDeleteSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AccountFiltersDeleteSamples.java index 0b7e9910bfbb..71642e4f1753 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AccountFiltersDeleteSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AccountFiltersDeleteSamples.java @@ -2,20 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; /** Samples for AccountFilters Delete. */ public final class AccountFiltersDeleteSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accountFilters-delete.json + */ /** * Sample code: Delete an Account Filter. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void deleteAnAccountFilter( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + public static void deleteAnAccountFilter(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .accountFilters() .deleteWithResponse("contoso", "contosomedia", "accountFilterWithTimeWindowAndTrack", Context.NONE); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AccountFiltersGetSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AccountFiltersGetSamples.java new file mode 100644 index 000000000000..312493fd0942 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AccountFiltersGetSamples.java @@ -0,0 +1,22 @@ +// 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 AccountFilters Get. */ +public final class AccountFiltersGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accountFilters-get-by-name.json + */ + /** + * Sample code: Get an Account Filter by name. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getAnAccountFilterByName(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.accountFilters().getWithResponse("contoso", "contosomedia", "accountFilterWithTrack", Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AccountFiltersListSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AccountFiltersListSamples.java new file mode 100644 index 000000000000..1ef8a48ccd8d --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AccountFiltersListSamples.java @@ -0,0 +1,22 @@ +// 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 AccountFilters List. */ +public final class AccountFiltersListSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accountFilters-list-all.json + */ + /** + * Sample code: List all Account Filters. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listAllAccountFilters(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.accountFilters().list("contoso", "contosomedia", Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AccountFiltersUpdateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AccountFiltersUpdateSamples.java similarity index 76% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AccountFiltersUpdateSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AccountFiltersUpdateSamples.java index f93327c5453a..6986393fd34c 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AccountFiltersUpdateSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AccountFiltersUpdateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.mediaservices.models.AccountFilter; @@ -11,15 +11,17 @@ /** Samples for AccountFilters Update. */ public final class AccountFiltersUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accountFilters-update.json + */ /** * Sample code: Update an Account Filter. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void updateAnAccountFilter( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { + public static void updateAnAccountFilter(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { AccountFilter resource = - mediaServicesManager + manager .accountFilters() .getWithResponse("contoso", "contosomedia", "accountFilterWithTimeWindowAndTrack", Context.NONE) .getValue(); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetFiltersCreateOrUpdateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetFiltersCreateOrUpdateSamples.java similarity index 89% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetFiltersCreateOrUpdateSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetFiltersCreateOrUpdateSamples.java index ec9d51c61e51..202bdea18d20 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetFiltersCreateOrUpdateSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetFiltersCreateOrUpdateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.resourcemanager.mediaservices.models.FilterTrackPropertyCompareOperation; import com.azure.resourcemanager.mediaservices.models.FilterTrackPropertyCondition; @@ -14,14 +14,16 @@ /** Samples for AssetFilters CreateOrUpdate. */ public final class AssetFiltersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/assetFilters-create.json + */ /** * Sample code: Create an Asset Filter. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void createAnAssetFilter( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + public static void createAnAssetFilter(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .assetFilters() .define("newAssetFilter") .withExistingAsset("contoso", "contosomedia", "ClimbingMountRainer") diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetFiltersDeleteSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetFiltersDeleteSamples.java similarity index 57% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetFiltersDeleteSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetFiltersDeleteSamples.java index acdd823fafde..f2cc3d5202cf 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetFiltersDeleteSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetFiltersDeleteSamples.java @@ -2,20 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; /** Samples for AssetFilters Delete. */ public final class AssetFiltersDeleteSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/assetFilters-delete.json + */ /** * Sample code: Delete an Asset Filter. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void deleteAnAssetFilter( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + public static void deleteAnAssetFilter(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .assetFilters() .deleteWithResponse( "contoso", "contosomedia", "ClimbingMountRainer", "assetFilterWithTimeWindowAndTrack", Context.NONE); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetFiltersGetSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetFiltersGetSamples.java similarity index 56% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetFiltersGetSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetFiltersGetSamples.java index 1568d2d09199..73a73bb27eb7 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetFiltersGetSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetFiltersGetSamples.java @@ -2,20 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; /** Samples for AssetFilters Get. */ public final class AssetFiltersGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/assetFilters-get-by-name.json + */ /** * Sample code: Get an Asset Filter by name. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void getAnAssetFilterByName( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + public static void getAnAssetFilterByName(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .assetFilters() .getWithResponse( "contoso", "contosomedia", "ClimbingMountRainer", "assetFilterWithTimeWindowAndTrack", Context.NONE); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetFiltersListSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetFiltersListSamples.java new file mode 100644 index 000000000000..13bf844b9d77 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetFiltersListSamples.java @@ -0,0 +1,22 @@ +// 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 AssetFilters List. */ +public final class AssetFiltersListSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/assetFilters-list-all.json + */ + /** + * Sample code: List all Asset Filters. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listAllAssetFilters(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.assetFilters().list("contoso", "contosomedia", "ClimbingMountRainer", Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetFiltersUpdateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetFiltersUpdateSamples.java similarity index 76% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetFiltersUpdateSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetFiltersUpdateSamples.java index 8aceacbfd10a..9c1454269af6 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetFiltersUpdateSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetFiltersUpdateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.mediaservices.models.AssetFilter; @@ -11,15 +11,17 @@ /** Samples for AssetFilters Update. */ public final class AssetFiltersUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/assetFilters-update.json + */ /** * Sample code: Update an Asset Filter. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void updateAnAssetFilter( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { + public static void updateAnAssetFilter(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { AssetFilter resource = - mediaServicesManager + manager .assetFilters() .getWithResponse( "contoso", "contosomedia", "ClimbingMountRainer", "assetFilterWithTimeWindowAndTrack", Context.NONE) diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsCreateOrUpdateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetsCreateOrUpdateSamples.java similarity index 60% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsCreateOrUpdateSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetsCreateOrUpdateSamples.java index b51506e7bc7d..0c126ced4fdc 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsCreateOrUpdateSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetsCreateOrUpdateSamples.java @@ -2,18 +2,20 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; /** Samples for Assets CreateOrUpdate. */ public final class AssetsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/assets-create.json + */ /** * Sample code: Create an Asset. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void createAnAsset( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + public static void createAnAsset(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .assets() .define("ClimbingMountLogan") .withExistingMediaService("contoso", "contosomedia") diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetsDeleteSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetsDeleteSamples.java new file mode 100644 index 000000000000..c0bb45ec0699 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetsDeleteSamples.java @@ -0,0 +1,22 @@ +// 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 Assets Delete. */ +public final class AssetsDeleteSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/assets-delete.json + */ + /** + * Sample code: Delete an Asset. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void deleteAnAsset(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.assets().deleteWithResponse("contoso", "contosomedia", "ClimbingMountAdams", Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsGetEncryptionKeySamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetsGetEncryptionKeySamples.java similarity index 66% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsGetEncryptionKeySamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetsGetEncryptionKeySamples.java index ba04bb65065a..2dbc587fdd15 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsGetEncryptionKeySamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetsGetEncryptionKeySamples.java @@ -2,20 +2,23 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; /** Samples for Assets GetEncryptionKey. */ public final class AssetsGetEncryptionKeySamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/assets-get-encryption-keys.json + */ /** * Sample code: Get Asset Storage Encryption Keys. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void getAssetStorageEncryptionKeys( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .assets() .getEncryptionKeyWithResponse("contoso", "contosomedia", "ClimbingMountSaintHelens", Context.NONE); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetsGetSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetsGetSamples.java new file mode 100644 index 000000000000..96752ccbc665 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetsGetSamples.java @@ -0,0 +1,22 @@ +// 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 Assets Get. */ +public final class AssetsGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/assets-get-by-name.json + */ + /** + * Sample code: Get an Asset by name. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getAnAssetByName(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.assets().getWithResponse("contoso", "contosomedia", "ClimbingMountAdams", Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsListContainerSasSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetsListContainerSasSamples.java similarity index 70% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsListContainerSasSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetsListContainerSasSamples.java index fe74ce175920..1f6555cd7494 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsListContainerSasSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetsListContainerSasSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.mediaservices.models.AssetContainerPermission; @@ -11,14 +11,16 @@ /** Samples for Assets ListContainerSas. */ public final class AssetsListContainerSasSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/assets-list-sas-urls.json + */ /** * Sample code: List Asset SAS URLs. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void listAssetSASURLs( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + public static void listAssetSASURLs(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .assets() .listContainerSasWithResponse( "contoso", diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetsListSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetsListSamples.java new file mode 100644 index 000000000000..6b6644175b8d --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetsListSamples.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 Assets List. */ +public final class AssetsListSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/assets-list-by-date.json + */ + /** + * Sample code: List Asset ordered by date. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listAssetOrderedByDate(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.assets().list("contoso", "contosomedia", null, null, "properties/created", Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/assets-list-in-date-range.json + */ + /** + * Sample code: List Asset created in a date range. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listAssetCreatedInADateRange( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .assets() + .list( + "contoso", + "contosomedia", + "properties/created gt 2012-06-01 and properties/created lt 2013-07-01", + null, + "properties/created", + Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/assets-list-all.json + */ + /** + * Sample code: List all Assets. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listAllAssets(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.assets().list("contoso", "contosomedia", null, null, null, Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsListStreamingLocatorsSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetsListStreamingLocatorsSamples.java similarity index 55% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsListStreamingLocatorsSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetsListStreamingLocatorsSamples.java index 2196009fa34b..0807f48dd21a 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsListStreamingLocatorsSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetsListStreamingLocatorsSamples.java @@ -2,20 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; /** Samples for Assets ListStreamingLocators. */ public final class AssetsListStreamingLocatorsSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/assets-list-streaming-locators.json + */ /** * Sample code: List Asset SAS URLs. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void listAssetSASURLs( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + public static void listAssetSASURLs(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .assets() .listStreamingLocatorsWithResponse("contoso", "contosomedia", "ClimbingMountSaintHelens", Context.NONE); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsUpdateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetsUpdateSamples.java similarity index 51% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsUpdateSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetsUpdateSamples.java index 3228c7223a76..2ab5f5b4bec9 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsUpdateSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetsUpdateSamples.java @@ -2,25 +2,24 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.mediaservices.models.Asset; /** Samples for Assets Update. */ public final class AssetsUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/assets-update.json + */ /** * Sample code: Update an Asset. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void updateAnAsset( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { + public static void updateAnAsset(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { Asset resource = - mediaServicesManager - .assets() - .getWithResponse("contoso", "contosomedia", "ClimbingMountBaker", Context.NONE) - .getValue(); + manager.assets().getWithResponse("contoso", "contosomedia", "ClimbingMountBaker", Context.NONE).getValue(); resource.update().withDescription("A documentary showing the ascent of Mount Baker in HD").apply(); } } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/ContentKeyPoliciesCreateOrUpdateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/ContentKeyPoliciesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..d659ad5d341c --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/ContentKeyPoliciesCreateOrUpdateSamples.java @@ -0,0 +1,185 @@ +// 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.resourcemanager.mediaservices.models.ContentKeyPolicyClearKeyConfiguration; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyOpenRestriction; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyOption; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyPlayReadyConfiguration; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyPlayReadyContentType; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyPlayReadyLicense; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyPlayReadyLicenseType; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyPlayReadyPlayRight; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyPlayReadyUnknownOutputPassingOption; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyRestrictionTokenType; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyRsaTokenKey; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicySymmetricTokenKey; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyTokenRestriction; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyWidevineConfiguration; +import java.time.OffsetDateTime; +import java.util.Arrays; + +/** Samples for ContentKeyPolicies CreateOrUpdate. */ +public final class ContentKeyPoliciesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/content-key-policies-create-multiple-options.json + */ + /** + * Sample code: Creates a Content Key Policy with multiple options. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void createsAContentKeyPolicyWithMultipleOptions( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .contentKeyPolicies() + .define("PolicyCreatedWithMultipleOptions") + .withExistingMediaService("contoso", "contosomedia") + .withDescription("ArmPolicyDescription") + .withOptions( + Arrays + .asList( + new ContentKeyPolicyOption() + .withName("ClearKeyOption") + .withConfiguration(new ContentKeyPolicyClearKeyConfiguration()) + .withRestriction( + new ContentKeyPolicyTokenRestriction() + .withIssuer("urn:issuer") + .withAudience("urn:audience") + .withPrimaryVerificationKey( + new ContentKeyPolicySymmetricTokenKey() + .withKeyValue("AAAAAAAAAAAAAAAAAAAAAA==".getBytes())) + .withRestrictionTokenType(ContentKeyPolicyRestrictionTokenType.SWT)), + new ContentKeyPolicyOption() + .withName("widevineoption") + .withConfiguration( + new ContentKeyPolicyWidevineConfiguration() + .withWidevineTemplate( + "{\"allowed_track_types\":\"SD_HD\",\"content_key_specs\":[{\"track_type\":\"SD\",\"security_level\":1,\"required_output_protection\":{\"hdcp\":\"HDCP_V2\"}}],\"policy_overrides\":{\"can_play\":true,\"can_persist\":true,\"can_renew\":false}}")) + .withRestriction(new ContentKeyPolicyOpenRestriction()))) + .create(); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/content-key-policies-create-nodrm-token.json + */ + /** + * Sample code: Creates a Content Key Policy with ClearKey option and Token Restriction. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void createsAContentKeyPolicyWithClearKeyOptionAndTokenRestriction( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .contentKeyPolicies() + .define("PolicyWithClearKeyOptionAndSwtTokenRestriction") + .withExistingMediaService("contoso", "contosomedia") + .withDescription("ArmPolicyDescription") + .withOptions( + Arrays + .asList( + new ContentKeyPolicyOption() + .withName("ClearKeyOption") + .withConfiguration(new ContentKeyPolicyClearKeyConfiguration()) + .withRestriction( + new ContentKeyPolicyTokenRestriction() + .withIssuer("urn:issuer") + .withAudience("urn:audience") + .withPrimaryVerificationKey( + new ContentKeyPolicySymmetricTokenKey() + .withKeyValue("AAAAAAAAAAAAAAAAAAAAAA==".getBytes())) + .withRestrictionTokenType(ContentKeyPolicyRestrictionTokenType.SWT)))) + .create(); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/content-key-policies-create-playready-open.json + */ + /** + * Sample code: Creates a Content Key Policy with PlayReady option and Open Restriction. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void createsAContentKeyPolicyWithPlayReadyOptionAndOpenRestriction( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .contentKeyPolicies() + .define("PolicyWithPlayReadyOptionAndOpenRestriction") + .withExistingMediaService("contoso", "contosomedia") + .withDescription("ArmPolicyDescription") + .withOptions( + Arrays + .asList( + new ContentKeyPolicyOption() + .withName("ArmPolicyOptionName") + .withConfiguration( + new ContentKeyPolicyPlayReadyConfiguration() + .withLicenses( + Arrays + .asList( + new ContentKeyPolicyPlayReadyLicense() + .withAllowTestDevices(true) + .withBeginDate(OffsetDateTime.parse("2017-10-16T18:22:53.46Z")) + .withPlayRight( + new ContentKeyPolicyPlayReadyPlayRight() + .withScmsRestriction(2) + .withDigitalVideoOnlyContentRestriction(false) + .withImageConstraintForAnalogComponentVideoRestriction(true) + .withImageConstraintForAnalogComputerMonitorRestriction( + false) + .withAllowPassingVideoContentToUnknownOutput( + ContentKeyPolicyPlayReadyUnknownOutputPassingOption + .NOT_ALLOWED)) + .withLicenseType(ContentKeyPolicyPlayReadyLicenseType.PERSISTENT) + .withContentKeyLocation( + new ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader()) + .withContentType( + ContentKeyPolicyPlayReadyContentType.ULTRA_VIOLET_DOWNLOAD)))) + .withRestriction(new ContentKeyPolicyOpenRestriction()))) + .create(); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/content-key-policies-create-widevine-token.json + */ + /** + * Sample code: Creates a Content Key Policy with Widevine option and Token Restriction. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void createsAContentKeyPolicyWithWidevineOptionAndTokenRestriction( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .contentKeyPolicies() + .define("PolicyWithWidevineOptionAndJwtTokenRestriction") + .withExistingMediaService("contoso", "contosomedia") + .withDescription("ArmPolicyDescription") + .withOptions( + Arrays + .asList( + new ContentKeyPolicyOption() + .withName("widevineoption") + .withConfiguration( + new ContentKeyPolicyWidevineConfiguration() + .withWidevineTemplate( + "{\"allowed_track_types\":\"SD_HD\",\"content_key_specs\":[{\"track_type\":\"SD\",\"security_level\":1,\"required_output_protection\":{\"hdcp\":\"HDCP_V2\"}}],\"policy_overrides\":{\"can_play\":true,\"can_persist\":true,\"can_renew\":false}}")) + .withRestriction( + new ContentKeyPolicyTokenRestriction() + .withIssuer("urn:issuer") + .withAudience("urn:audience") + .withPrimaryVerificationKey( + new ContentKeyPolicyRsaTokenKey() + .withExponent("AQAB".getBytes()) + .withModulus("AQAD".getBytes())) + .withAlternateVerificationKeys( + Arrays + .asList( + new ContentKeyPolicySymmetricTokenKey() + .withKeyValue("AAAAAAAAAAAAAAAAAAAAAA==".getBytes()))) + .withRestrictionTokenType(ContentKeyPolicyRestrictionTokenType.JWT)))) + .create(); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/ContentKeyPoliciesDeleteSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/ContentKeyPoliciesDeleteSamples.java similarity index 56% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/ContentKeyPoliciesDeleteSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/ContentKeyPoliciesDeleteSamples.java index d9e7ac568084..111609309955 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/ContentKeyPoliciesDeleteSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/ContentKeyPoliciesDeleteSamples.java @@ -2,20 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; /** Samples for ContentKeyPolicies Delete. */ public final class ContentKeyPoliciesDeleteSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/content-key-policies-delete.json + */ /** * Sample code: Delete a Key Policy. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void deleteAKeyPolicy( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + public static void deleteAKeyPolicy(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .contentKeyPolicies() .deleteWithResponse("contoso", "contosomedia", "PolicyWithPlayReadyOptionAndOpenRestriction", Context.NONE); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/ContentKeyPoliciesGetPolicyPropertiesWithSecretsSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/ContentKeyPoliciesGetPolicyPropertiesWithSecretsSamples.java similarity index 69% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/ContentKeyPoliciesGetPolicyPropertiesWithSecretsSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/ContentKeyPoliciesGetPolicyPropertiesWithSecretsSamples.java index 89cc01d8a2d5..ec67889982ee 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/ContentKeyPoliciesGetPolicyPropertiesWithSecretsSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/ContentKeyPoliciesGetPolicyPropertiesWithSecretsSamples.java @@ -2,20 +2,23 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; /** Samples for ContentKeyPolicies GetPolicyPropertiesWithSecrets. */ public final class ContentKeyPoliciesGetPolicyPropertiesWithSecretsSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/content-key-policies-get-with-secrets.json + */ /** * Sample code: Get an Content Key Policy with secrets. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void getAnContentKeyPolicyWithSecrets( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .contentKeyPolicies() .getPolicyPropertiesWithSecretsWithResponse( "contoso", "contosomedia", "PolicyWithMultipleOptions", Context.NONE); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/ContentKeyPoliciesGetSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/ContentKeyPoliciesGetSamples.java similarity index 66% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/ContentKeyPoliciesGetSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/ContentKeyPoliciesGetSamples.java index 68e28df88807..c7aba06d422d 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/ContentKeyPoliciesGetSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/ContentKeyPoliciesGetSamples.java @@ -2,20 +2,23 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; /** Samples for ContentKeyPolicies Get. */ public final class ContentKeyPoliciesGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/content-key-policies-get-by-name.json + */ /** * Sample code: Get a Content Key Policy by name. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void getAContentKeyPolicyByName( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .contentKeyPolicies() .getWithResponse("contoso", "contosomedia", "PolicyWithMultipleOptions", Context.NONE); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/ContentKeyPoliciesListSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/ContentKeyPoliciesListSamples.java similarity index 59% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/ContentKeyPoliciesListSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/ContentKeyPoliciesListSamples.java index 0363f9b95e5b..46fc638a311e 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/ContentKeyPoliciesListSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/ContentKeyPoliciesListSamples.java @@ -2,30 +2,36 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; /** Samples for ContentKeyPolicies List. */ public final class ContentKeyPoliciesListSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/content-key-policies-list-all.json + */ /** * Sample code: Lists all Content Key Policies. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void listsAllContentKeyPolicies( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager.contentKeyPolicies().list("contoso", "contosomedia", null, null, null, Context.NONE); + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.contentKeyPolicies().list("contoso", "contosomedia", null, null, null, Context.NONE); } + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/content-key-policies-list-in-date-range.json + */ /** * Sample code: Lists Content Key Policies with created and last modified filters. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void listsContentKeyPoliciesWithCreatedAndLastModifiedFilters( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .contentKeyPolicies() .list( "contoso", @@ -36,14 +42,17 @@ public static void listsContentKeyPoliciesWithCreatedAndLastModifiedFilters( Context.NONE); } + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/content-key-policies-list-by-lastModified.json + */ /** * Sample code: Lists Content Key Policies ordered by last modified. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void listsContentKeyPoliciesOrderedByLastModified( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .contentKeyPolicies() .list("contoso", "contosomedia", null, null, "properties/lastModified", Context.NONE); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/ContentKeyPoliciesUpdateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/ContentKeyPoliciesUpdateSamples.java similarity index 71% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/ContentKeyPoliciesUpdateSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/ContentKeyPoliciesUpdateSamples.java index 6e2675cbb6db..7e9dcef77102 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/ContentKeyPoliciesUpdateSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/ContentKeyPoliciesUpdateSamples.java @@ -2,26 +2,28 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicy; -import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyConfiguration; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyClearKeyConfiguration; +import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyOpenRestriction; import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyOption; -import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyRestriction; import java.util.Arrays; /** Samples for ContentKeyPolicies Update. */ public final class ContentKeyPoliciesUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/content-key-policies-update.json + */ /** * Sample code: Update a Content Key Policy. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void updateAContentKeyPolicy( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { + public static void updateAContentKeyPolicy(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { ContentKeyPolicy resource = - mediaServicesManager + manager .contentKeyPolicies() .getWithResponse("contoso", "contosomedia", "PolicyWithClearKeyOptionAndTokenRestriction", Context.NONE) .getValue(); @@ -33,8 +35,8 @@ public static void updateAContentKeyPolicy( .asList( new ContentKeyPolicyOption() .withName("ClearKeyOption") - .withConfiguration(new ContentKeyPolicyConfiguration()) - .withRestriction(new ContentKeyPolicyRestriction()))) + .withConfiguration(new ContentKeyPolicyClearKeyConfiguration()) + .withRestriction(new ContentKeyPolicyOpenRestriction()))) .apply(); } } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/JobsCancelJobSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/JobsCancelJobSamples.java similarity index 62% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/JobsCancelJobSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/JobsCancelJobSamples.java index 682a713082a8..44195bceec59 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/JobsCancelJobSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/JobsCancelJobSamples.java @@ -2,19 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; /** Samples for Jobs CancelJob. */ public final class JobsCancelJobSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/jobs-cancel.json + */ /** * Sample code: Cancel a Job. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void cancelAJob(com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + public static void cancelAJob(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .jobs() .cancelJobWithResponse("contosoresources", "contosomedia", "exampleTransform", "job1", Context.NONE); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/JobsCreateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/JobsCreateSamples.java similarity index 69% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/JobsCreateSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/JobsCreateSamples.java index 7cdab48656bf..f81be4be7a16 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/JobsCreateSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/JobsCreateSamples.java @@ -2,28 +2,31 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.resourcemanager.mediaservices.models.JobInput; -import com.azure.resourcemanager.mediaservices.models.JobOutput; +import com.azure.resourcemanager.mediaservices.models.JobOutputAsset; import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** Samples for Jobs Create. */ public final class JobsCreateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/jobs-create.json + */ /** * Sample code: Create a Job. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void createAJob(com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + public static void createAJob(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .jobs() .define("job1") .withExistingTransform("contosoresources", "contosomedia", "exampleTransform") .withInput(new JobInput()) - .withOutputs(Arrays.asList(new JobOutput())) + .withOutputs(Arrays.asList(new JobOutputAsset().withAssetName("job1-OutputAsset"))) .withCorrelationData(mapOf("Key 2", "Value 2", "key1", "value1")) .create(); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/JobsDeleteSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/JobsDeleteSamples.java similarity index 62% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/JobsDeleteSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/JobsDeleteSamples.java index 5a7d26c33c4c..abd4eb1f1969 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/JobsDeleteSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/JobsDeleteSamples.java @@ -2,19 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; /** Samples for Jobs Delete. */ public final class JobsDeleteSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/jobs-delete.json + */ /** * Sample code: Delete a Job. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void deleteAJob(com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + public static void deleteAJob(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .jobs() .deleteWithResponse("contosoresources", "contosomedia", "exampleTransform", "jobToDelete", Context.NONE); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/JobsGetSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/JobsGetSamples.java new file mode 100644 index 000000000000..aa309629bb93 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/JobsGetSamples.java @@ -0,0 +1,22 @@ +// 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 Jobs Get. */ +public final class JobsGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/jobs-get-by-name.json + */ + /** + * Sample code: Get a Job by name. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getAJobByName(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.jobs().getWithResponse("contosoresources", "contosomedia", "exampleTransform", "job1", Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/JobsListSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/JobsListSamples.java similarity index 65% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/JobsListSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/JobsListSamples.java index b71a8de5dc21..1db533a01402 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/JobsListSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/JobsListSamples.java @@ -2,20 +2,23 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; /** Samples for Jobs List. */ public final class JobsListSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/jobs-list-all-filter-by-state-ne.json + */ /** * Sample code: Lists Jobs for the Transform filter by state not equal. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void listsJobsForTheTransformFilterByStateNotEqual( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .jobs() .list( "contosoresources", @@ -26,14 +29,17 @@ public static void listsJobsForTheTransformFilterByStateNotEqual( Context.NONE); } + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/jobs-list-all-filter-by-state-eq.json + */ /** * Sample code: Lists Jobs for the Transform filter by state equal. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void listsJobsForTheTransformFilterByStateEqual( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .jobs() .list( "contosoresources", @@ -44,14 +50,17 @@ public static void listsJobsForTheTransformFilterByStateEqual( Context.NONE); } + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/jobs-list-all-filter-by-name.json + */ /** * Sample code: Lists Jobs for the Transform filter by name. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void listsJobsForTheTransformFilterByName( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .jobs() .list( "contosoresources", @@ -62,14 +71,17 @@ public static void listsJobsForTheTransformFilterByName( Context.NONE); } + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/jobs-list-all-filter-by-lastmodified.json + */ /** * Sample code: Lists Jobs for the Transform filter by lastmodified. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void listsJobsForTheTransformFilterByLastmodified( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .jobs() .list( "contosoresources", @@ -81,14 +93,17 @@ public static void listsJobsForTheTransformFilterByLastmodified( Context.NONE); } + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/jobs-list-all-filter-by-created.json + */ /** * Sample code: Lists Jobs for the Transform filter by created. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void listsJobsForTheTransformFilterByCreated( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .jobs() .list( "contosoresources", @@ -100,26 +115,30 @@ public static void listsJobsForTheTransformFilterByCreated( Context.NONE); } + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/jobs-list-all.json + */ /** * Sample code: Lists all of the Jobs for the Transform. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void listsAllOfTheJobsForTheTransform( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager - .jobs() - .list("contosoresources", "contosomedia", "exampleTransform", null, null, Context.NONE); + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.jobs().list("contosoresources", "contosomedia", "exampleTransform", null, null, Context.NONE); } + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/jobs-list-all-filter-by-name-and-state.json + */ /** * Sample code: Lists Jobs for the Transform filter by name and state. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void listsJobsForTheTransformFilterByNameAndState( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .jobs() .list( "contosoresources", diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/JobsUpdateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/JobsUpdateSamples.java similarity index 67% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/JobsUpdateSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/JobsUpdateSamples.java index cf8e4b9eaed1..9cc1d5042611 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/JobsUpdateSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/JobsUpdateSamples.java @@ -2,25 +2,28 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.mediaservices.models.Job; import com.azure.resourcemanager.mediaservices.models.JobInput; -import com.azure.resourcemanager.mediaservices.models.JobOutput; +import com.azure.resourcemanager.mediaservices.models.JobOutputAsset; import com.azure.resourcemanager.mediaservices.models.Priority; import java.util.Arrays; /** Samples for Jobs Update. */ public final class JobsUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/jobs-update.json + */ /** * Sample code: Update a Job. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void updateAJob(com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { + public static void updateAJob(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { Job resource = - mediaServicesManager + manager .jobs() .getWithResponse("contosoresources", "contosomedia", "exampleTransform", "job1", Context.NONE) .getValue(); @@ -28,7 +31,7 @@ public static void updateAJob(com.azure.resourcemanager.mediaservices.MediaServi .update() .withDescription("Example job to illustrate update.") .withInput(new JobInput()) - .withOutputs(Arrays.asList(new JobOutput())) + .withOutputs(Arrays.asList(new JobOutputAsset().withAssetName("job1-OutputAsset"))) .withPriority(Priority.HIGH) .apply(); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsAllocateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsAllocateSamples.java new file mode 100644 index 000000000000..f5a0ee9ab363 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsAllocateSamples.java @@ -0,0 +1,22 @@ +// 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 LiveEvents Allocate. */ +public final class LiveEventsAllocateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/liveevent-allocate.json + */ + /** + * Sample code: Allocate a LiveEvent. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void allocateALiveEvent(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.liveEvents().allocate("mediaresources", "slitestmedia10", "myLiveEvent1", Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsCreateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsCreateSamples.java similarity index 88% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsCreateSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsCreateSamples.java index e40e42e04791..2712c95b1570 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsCreateSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsCreateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.resourcemanager.mediaservices.models.IpAccessControl; import com.azure.resourcemanager.mediaservices.models.IpRange; @@ -17,14 +17,16 @@ /** Samples for LiveEvents Create. */ public final class LiveEventsCreateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/liveevent-create.json + */ /** * Sample code: Create a LiveEvent. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void createALiveEvent( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + public static void createALiveEvent(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .liveEvents() .define("myLiveEvent1") .withRegion("West US") diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsDeleteSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsDeleteSamples.java new file mode 100644 index 000000000000..19c582e0ffba --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsDeleteSamples.java @@ -0,0 +1,22 @@ +// 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 LiveEvents Delete. */ +public final class LiveEventsDeleteSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/liveevent-delete.json + */ + /** + * Sample code: Delete a LiveEvent. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void deleteALiveEvent(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.liveEvents().delete("mediaresources", "slitestmedia10", "myLiveEvent1", Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsGetSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsGetSamples.java new file mode 100644 index 000000000000..a3619bc8aecd --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsGetSamples.java @@ -0,0 +1,22 @@ +// 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 LiveEvents Get. */ +public final class LiveEventsGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/liveevent-list-by-name.json + */ + /** + * Sample code: Get a LiveEvent by name. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getALiveEventByName(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.liveEvents().getWithResponse("mediaresources", "slitestmedia10", "myLiveEvent1", Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsListSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsListSamples.java new file mode 100644 index 000000000000..a5c985745919 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsListSamples.java @@ -0,0 +1,22 @@ +// 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 LiveEvents List. */ +public final class LiveEventsListSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/liveevent-list-all.json + */ + /** + * Sample code: List all LiveEvents. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listAllLiveEvents(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.liveEvents().list("mediaresources", "slitestmedia10", Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsResetSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsResetSamples.java new file mode 100644 index 000000000000..f7be3347d0f4 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsResetSamples.java @@ -0,0 +1,22 @@ +// 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 LiveEvents Reset. */ +public final class LiveEventsResetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/liveevent-reset.json + */ + /** + * Sample code: Reset a LiveEvent. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void resetALiveEvent(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.liveEvents().reset("mediaresources", "slitestmedia10", "myLiveEvent1", Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsStartSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsStartSamples.java new file mode 100644 index 000000000000..4c43999e572f --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsStartSamples.java @@ -0,0 +1,22 @@ +// 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 LiveEvents Start. */ +public final class LiveEventsStartSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/liveevent-start.json + */ + /** + * Sample code: Start a LiveEvent. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void startALiveEvent(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.liveEvents().start("mediaresources", "slitestmedia10", "myLiveEvent1", Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsStopSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsStopSamples.java similarity index 62% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsStopSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsStopSamples.java index 96aebe873fdd..175f2326e944 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsStopSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsStopSamples.java @@ -2,21 +2,23 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.mediaservices.models.LiveEventActionInput; /** Samples for LiveEvents Stop. */ public final class LiveEventsStopSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/liveevent-stop.json + */ /** * Sample code: Stop a LiveEvent. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void stopALiveEvent( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + public static void stopALiveEvent(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .liveEvents() .stop( "mediaresources", diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsUpdateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsUpdateSamples.java similarity index 87% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsUpdateSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsUpdateSamples.java index e6af356919fc..9ae3bb107ff8 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsUpdateSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsUpdateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.mediaservices.models.IpAccessControl; @@ -19,15 +19,17 @@ /** Samples for LiveEvents Update. */ public final class LiveEventsUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/liveevent-update.json + */ /** * Sample code: Update a LiveEvent. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void updateALiveEvent( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { + public static void updateALiveEvent(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { LiveEvent resource = - mediaServicesManager + manager .liveEvents() .getWithResponse("mediaresources", "slitestmedia10", "myLiveEvent1", Context.NONE) .getValue(); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveOutputsCreateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveOutputsCreateSamples.java similarity index 68% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveOutputsCreateSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveOutputsCreateSamples.java index 861e39a0ff02..c344d9da6d27 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveOutputsCreateSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveOutputsCreateSamples.java @@ -2,21 +2,23 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.resourcemanager.mediaservices.models.Hls; import java.time.Duration; /** Samples for LiveOutputs Create. */ public final class LiveOutputsCreateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/liveoutput-create.json + */ /** * Sample code: Create a LiveOutput. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void createALiveOutput( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + public static void createALiveOutput(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .liveOutputs() .define("myLiveOutput1") .withExistingLiveEvent("mediaresources", "slitestmedia10", "myLiveEvent1") diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveOutputsDeleteSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveOutputsDeleteSamples.java new file mode 100644 index 000000000000..c46219949c8c --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveOutputsDeleteSamples.java @@ -0,0 +1,22 @@ +// 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 LiveOutputs Delete. */ +public final class LiveOutputsDeleteSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/liveoutput-delete.json + */ + /** + * Sample code: Delete a LiveOutput. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void deleteALiveOutput(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.liveOutputs().delete("mediaresources", "slitestmedia10", "myLiveEvent1", "myLiveOutput1", Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveOutputsGetSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveOutputsGetSamples.java similarity index 54% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveOutputsGetSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveOutputsGetSamples.java index 5fb042db8e6f..af4b074e6901 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveOutputsGetSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveOutputsGetSamples.java @@ -2,20 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; /** Samples for LiveOutputs Get. */ public final class LiveOutputsGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/liveoutput-list-by-name.json + */ /** * Sample code: Get a LiveOutput by name. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void getALiveOutputByName( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + public static void getALiveOutputByName(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .liveOutputs() .getWithResponse("mediaresources", "slitestmedia10", "myLiveEvent1", "myLiveOutput1", Context.NONE); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveOutputsListSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveOutputsListSamples.java new file mode 100644 index 000000000000..407a4a88b996 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveOutputsListSamples.java @@ -0,0 +1,22 @@ +// 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 LiveOutputs List. */ +public final class LiveOutputsListSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/liveoutput-list-all.json + */ + /** + * Sample code: List all LiveOutputs. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listAllLiveOutputs(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.liveOutputs().list("mediaresources", "slitestmedia10", "myLiveEvent1", Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LocationsCheckNameAvailabilitySamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LocationsCheckNameAvailabilitySamples.java similarity index 62% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LocationsCheckNameAvailabilitySamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LocationsCheckNameAvailabilitySamples.java index b0a5ab76a9a0..664dc5d1f310 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LocationsCheckNameAvailabilitySamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LocationsCheckNameAvailabilitySamples.java @@ -2,21 +2,23 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; 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 + */ /** * Sample code: Check Name Availability. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void checkNameAvailability( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + public static void checkNameAvailability(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .locations() .checkNameAvailabilityWithResponse( "japanwest", diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesCreateOrUpdateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesCreateOrUpdateSamples.java similarity index 93% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesCreateOrUpdateSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesCreateOrUpdateSamples.java index 3aaec6b5d995..a18192dcfc62 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesCreateOrUpdateSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesCreateOrUpdateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.resourcemanager.mediaservices.models.AccountEncryption; import com.azure.resourcemanager.mediaservices.models.AccountEncryptionKeyType; @@ -19,14 +19,17 @@ /** 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 + */ /** * Sample code: Create a Media Services account. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void createAMediaServicesAccount( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .mediaservices() .define("contososports") .withRegion("South Central US") diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesDeleteSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesDeleteSamples.java similarity index 56% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesDeleteSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesDeleteSamples.java index d69a514ac264..70a4356e767d 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesDeleteSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesDeleteSamples.java @@ -2,19 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; 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 + */ /** * Sample code: Delete a Media Services account. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void deleteAMediaServicesAccount( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager.mediaservices().deleteWithResponse("contoso", "contososports", Context.NONE); + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.mediaservices().deleteWithResponse("contoso", "contososports", Context.NONE); } } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesGetByResourceGroupSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesGetByResourceGroupSamples.java similarity index 56% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesGetByResourceGroupSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesGetByResourceGroupSamples.java index 0fbdc4897f3f..b4df7de3d5eb 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesGetByResourceGroupSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesGetByResourceGroupSamples.java @@ -2,19 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; 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 + */ /** * Sample code: Get a Media Services account by name. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void getAMediaServicesAccountByName( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager.mediaservices().getByResourceGroupWithResponse("contoso", "contosotv", Context.NONE); + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.mediaservices().getByResourceGroupWithResponse("contoso", "contosotv", Context.NONE); } } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesListByResourceGroupSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesListByResourceGroupSamples.java similarity index 57% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesListByResourceGroupSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesListByResourceGroupSamples.java index f3f11a53714b..c074291ba006 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesListByResourceGroupSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesListByResourceGroupSamples.java @@ -2,19 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; 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 + */ /** * Sample code: List all Media Services accounts. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void listAllMediaServicesAccounts( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager.mediaservices().listByResourceGroup("contoso", Context.NONE); + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.mediaservices().listByResourceGroup("contoso", Context.NONE); } } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesListEdgePoliciesSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesListEdgePoliciesSamples.java similarity index 62% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesListEdgePoliciesSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesListEdgePoliciesSamples.java index de541b07bd0a..1f382e1a56f6 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesListEdgePoliciesSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesListEdgePoliciesSamples.java @@ -2,21 +2,23 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; 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 + */ /** * Sample code: List the media edge policies. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void listTheMediaEdgePolicies( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + public static void listTheMediaEdgePolicies(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .mediaservices() .listEdgePoliciesWithResponse( "contoso", diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesListSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesListSamples.java similarity index 57% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesListSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesListSamples.java index ba538d8a549d..41089bb6a87b 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesListSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesListSamples.java @@ -2,19 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; 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 + */ /** * Sample code: List all Media Services accounts. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void listAllMediaServicesAccounts( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager.mediaservices().list(Context.NONE); + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.mediaservices().list(Context.NONE); } } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesSyncStorageKeysSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesSyncStorageKeysSamples.java similarity index 71% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesSyncStorageKeysSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesSyncStorageKeysSamples.java index a21096af10ec..3e0dd9d66273 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesSyncStorageKeysSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesSyncStorageKeysSamples.java @@ -2,21 +2,24 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; 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 + */ /** * Sample code: Synchronizes Storage Account Keys. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void synchronizesStorageAccountKeys( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .mediaservices() .syncStorageKeysWithResponse( "contoso", "contososports", new SyncStorageKeysInput().withId("contososportsstore"), Context.NONE); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesUpdateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesUpdateSamples.java similarity index 72% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesUpdateSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesUpdateSamples.java index fb5787c7f747..ca594307dc67 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesUpdateSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesUpdateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.mediaservices.models.MediaService; @@ -11,18 +11,18 @@ /** 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 + */ /** * Sample code: Update a Media Services accounts. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void updateAMediaServicesAccounts( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { MediaService resource = - mediaServicesManager - .mediaservices() - .getByResourceGroupWithResponse("contoso", "contososports", Context.NONE) - .getValue(); + manager.mediaservices().getByResourceGroupWithResponse("contoso", "contososports", Context.NONE).getValue(); resource.update().withTags(mapOf("key1", "value3")).apply(); } 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 new file mode 100644 index 000000000000..1774ac0e06d1 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/OperationsListSamples.java @@ -0,0 +1,22 @@ +// 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 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 + */ + /** + * Sample code: List Operations. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listOperations(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.operations().listWithResponse(Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/PrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java similarity index 80% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/PrivateEndpointConnectionsCreateOrUpdateSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java index a24cf44ca3a2..1c483d7f832b 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/PrivateEndpointConnectionsCreateOrUpdateSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.mediaservices.models.PrivateEndpointConnection; @@ -11,15 +11,18 @@ /** 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 + */ /** * Sample code: Update private endpoint connection. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void updatePrivateEndpointConnection( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { PrivateEndpointConnection resource = - mediaServicesManager + manager .privateEndpointConnections() .getWithResponse("contoso", "contososports", "connectionName1", Context.NONE) .getValue(); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/PrivateEndpointConnectionsDeleteSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateEndpointConnectionsDeleteSamples.java similarity index 67% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/PrivateEndpointConnectionsDeleteSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateEndpointConnectionsDeleteSamples.java index ea7b40844754..a321d0d73d46 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/PrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -2,20 +2,23 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; 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 + */ /** * Sample code: Delete private endpoint connection. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void deletePrivateEndpointConnection( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .privateEndpointConnections() .deleteWithResponse("contoso", "contososports", "connectionName1", Context.NONE); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/PrivateEndpointConnectionsGetSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateEndpointConnectionsGetSamples.java similarity index 66% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/PrivateEndpointConnectionsGetSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateEndpointConnectionsGetSamples.java index bcbe29123559..41c490757313 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/PrivateEndpointConnectionsGetSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateEndpointConnectionsGetSamples.java @@ -2,20 +2,23 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; 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 + */ /** * Sample code: Get private endpoint connection. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void getPrivateEndpointConnection( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .privateEndpointConnections() .getWithResponse("contoso", "contososports", "connectionName1", Context.NONE); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/PrivateEndpointConnectionsListSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateEndpointConnectionsListSamples.java similarity index 55% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/PrivateEndpointConnectionsListSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateEndpointConnectionsListSamples.java index c02db9ed6ddd..bfe9183df187 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/PrivateEndpointConnectionsListSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateEndpointConnectionsListSamples.java @@ -2,19 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; 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 + */ /** * Sample code: Get all private endpoint connections. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void getAllPrivateEndpointConnections( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager.privateEndpointConnections().listWithResponse("contoso", "contososports", Context.NONE); + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.privateEndpointConnections().listWithResponse("contoso", "contososports", Context.NONE); } } 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 new file mode 100644 index 000000000000..b8ee755c51c8 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateLinkResourcesGetSamples.java @@ -0,0 +1,22 @@ +// 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 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 + */ + /** + * Sample code: Get details of a group ID. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getDetailsOfAGroupID(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.privateLinkResources().getWithResponse("contoso", "contososports", "keydelivery", Context.NONE); + } +} 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 new file mode 100644 index 000000000000..05d0cac912a8 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateLinkResourcesListSamples.java @@ -0,0 +1,22 @@ +// 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 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 + */ + /** + * Sample code: Get list of all group IDs. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getListOfAllGroupIDs(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.privateLinkResources().listWithResponse("contoso", "contososports", Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsCreateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsCreateSamples.java similarity index 87% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsCreateSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsCreateSamples.java index 386327a2ccf1..8fdee1f14770 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsCreateSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsCreateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.resourcemanager.mediaservices.models.AkamaiAccessControl; import com.azure.resourcemanager.mediaservices.models.AkamaiSignatureHeaderAuthenticationKey; @@ -16,14 +16,16 @@ /** Samples for StreamingEndpoints Create. */ public final class StreamingEndpointsCreateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streamingendpoint-create.json + */ /** * Sample code: Create a streaming endpoint. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void createAStreamingEndpoint( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + public static void createAStreamingEndpoint(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .streamingEndpoints() .define("myStreamingEndpoint1") .withRegion("West US") diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsDeleteSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsDeleteSamples.java new file mode 100644 index 000000000000..eee0a1c14c9f --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsDeleteSamples.java @@ -0,0 +1,22 @@ +// 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 StreamingEndpoints Delete. */ +public final class StreamingEndpointsDeleteSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streamingendpoint-delete.json + */ + /** + * Sample code: Delete a streaming endpoint. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void deleteAStreamingEndpoint(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.streamingEndpoints().delete("mediaresources", "slitestmedia10", "myStreamingEndpoint1", Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsGetSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsGetSamples.java similarity index 66% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsGetSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsGetSamples.java index 4ec3fd8295c2..5d59cdc2d922 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsGetSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsGetSamples.java @@ -2,20 +2,23 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; /** Samples for StreamingEndpoints Get. */ public final class StreamingEndpointsGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streamingendpoint-list-by-name.json + */ /** * Sample code: Get a streaming endpoint by name. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void getAStreamingEndpointByName( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .streamingEndpoints() .getWithResponse("mediaresources", "slitestmedia10", "myStreamingEndpoint1", Context.NONE); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsListSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsListSamples.java new file mode 100644 index 000000000000..d5025810562c --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsListSamples.java @@ -0,0 +1,22 @@ +// 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 StreamingEndpoints List. */ +public final class StreamingEndpointsListSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streamingendpoint-list-all.json + */ + /** + * Sample code: List all streaming endpoints. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listAllStreamingEndpoints(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.streamingEndpoints().list("mediaresources", "slitestmedia10", Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsScaleSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsScaleSamples.java similarity index 63% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsScaleSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsScaleSamples.java index 9bfd490998c4..ad0ce125c85d 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsScaleSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsScaleSamples.java @@ -2,21 +2,23 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.mediaservices.models.StreamingEntityScaleUnit; /** Samples for StreamingEndpoints Scale. */ public final class StreamingEndpointsScaleSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streamingendpoint-scale.json + */ /** * Sample code: Scale a StreamingEndpoint. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void scaleAStreamingEndpoint( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + public static void scaleAStreamingEndpoint(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .streamingEndpoints() .scale( "mediaresources", diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsStartSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsStartSamples.java new file mode 100644 index 000000000000..ac06af563518 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsStartSamples.java @@ -0,0 +1,22 @@ +// 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 StreamingEndpoints Start. */ +public final class StreamingEndpointsStartSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streamingendpoint-start.json + */ + /** + * Sample code: Start a streaming endpoint. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void startAStreamingEndpoint(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.streamingEndpoints().start("mediaresources", "slitestmedia10", "myStreamingEndpoint1", Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsStopSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsStopSamples.java new file mode 100644 index 000000000000..c613c25299b6 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsStopSamples.java @@ -0,0 +1,22 @@ +// 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 StreamingEndpoints Stop. */ +public final class StreamingEndpointsStopSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streamingendpoint-stop.json + */ + /** + * Sample code: Stop a streaming endpoint. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void stopAStreamingEndpoint(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.streamingEndpoints().stop("mediaresources", "slitestmedia10", "myStreamingEndpoint1", Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsUpdateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsUpdateSamples.java similarity index 75% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsUpdateSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsUpdateSamples.java index 9bf6adba3656..34fc8dc2eb1e 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsUpdateSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsUpdateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.mediaservices.models.StreamingEndpoint; @@ -11,15 +11,17 @@ /** Samples for StreamingEndpoints Update. */ public final class StreamingEndpointsUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streamingendpoint-update.json + */ /** * Sample code: Update a streaming endpoint. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void updateAStreamingEndpoint( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { + public static void updateAStreamingEndpoint(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { StreamingEndpoint resource = - mediaServicesManager + manager .streamingEndpoints() .getWithResponse("mediaresources", "slitestmedia10", "myStreamingEndpoint1", Context.NONE) .getValue(); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingLocatorsCreateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingLocatorsCreateSamples.java similarity index 79% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingLocatorsCreateSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingLocatorsCreateSamples.java index c4780e50e367..4d280ff2c0ae 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingLocatorsCreateSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingLocatorsCreateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.resourcemanager.mediaservices.models.StreamingLocatorContentKey; import java.time.OffsetDateTime; @@ -11,14 +11,17 @@ /** Samples for StreamingLocators Create. */ public final class StreamingLocatorsCreateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-locators-create-clear.json + */ /** * Sample code: Creates a Streaming Locator with clear streaming. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void createsAStreamingLocatorWithClearStreaming( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .streamingLocators() .define("UserCreatedClearStreamingLocator") .withExistingMediaService("contoso", "contosomedia") @@ -27,14 +30,17 @@ public static void createsAStreamingLocatorWithClearStreaming( .create(); } + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-locators-create-secure.json + */ /** * Sample code: Creates a Streaming Locator with secure streaming. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void createsAStreamingLocatorWithSecureStreaming( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .streamingLocators() .define("UserCreatedSecureStreamingLocator") .withExistingMediaService("contoso", "contosomedia") @@ -45,14 +51,17 @@ public static void createsAStreamingLocatorWithSecureStreaming( .create(); } + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-locators-create-secure-userDefinedContentKeys.json + */ /** * Sample code: Creates a Streaming Locator with user defined content keys. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void createsAStreamingLocatorWithUserDefinedContentKeys( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .streamingLocators() .define("UserCreatedSecureStreamingLocatorWithUserDefinedContentKeys") .withExistingMediaService("contoso", "contosomedia") diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingLocatorsDeleteSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingLocatorsDeleteSamples.java similarity index 54% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingLocatorsDeleteSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingLocatorsDeleteSamples.java index a436cd390c1d..f4892702734f 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingLocatorsDeleteSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingLocatorsDeleteSamples.java @@ -2,20 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; /** Samples for StreamingLocators Delete. */ public final class StreamingLocatorsDeleteSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-locators-delete.json + */ /** * Sample code: Delete a Streaming Locator. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void deleteAStreamingLocator( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + public static void deleteAStreamingLocator(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .streamingLocators() .deleteWithResponse("contoso", "contosomedia", "clearStreamingLocator", Context.NONE); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingLocatorsGetSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingLocatorsGetSamples.java similarity index 53% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingLocatorsGetSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingLocatorsGetSamples.java index 974c7fcc8a54..76e70a13b705 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingLocatorsGetSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingLocatorsGetSamples.java @@ -2,21 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; /** Samples for StreamingLocators Get. */ public final class StreamingLocatorsGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-locators-get-by-name.json + */ /** * Sample code: Get a Streaming Locator by name. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void getAStreamingLocatorByName( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager - .streamingLocators() - .getWithResponse("contoso", "contosomedia", "clearStreamingLocator", Context.NONE); + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.streamingLocators().getWithResponse("contoso", "contosomedia", "clearStreamingLocator", Context.NONE); } } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingLocatorsListContentKeysSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingLocatorsListContentKeysSamples.java similarity index 55% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingLocatorsListContentKeysSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingLocatorsListContentKeysSamples.java index 24c2cc6ad968..d522fff0eef8 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingLocatorsListContentKeysSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingLocatorsListContentKeysSamples.java @@ -2,20 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; /** Samples for StreamingLocators ListContentKeys. */ public final class StreamingLocatorsListContentKeysSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-locators-list-content-keys.json + */ /** * Sample code: List Content Keys. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void listContentKeys( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + public static void listContentKeys(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .streamingLocators() .listContentKeysWithResponse("contoso", "contosomedia", "secureStreamingLocator", Context.NONE); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingLocatorsListPathsSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingLocatorsListPathsSamples.java similarity index 62% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingLocatorsListPathsSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingLocatorsListPathsSamples.java index 8b311453792d..1a27e45fc99e 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingLocatorsListPathsSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingLocatorsListPathsSamples.java @@ -2,32 +2,38 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; /** Samples for StreamingLocators ListPaths. */ public final class StreamingLocatorsListPathsSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-locators-list-paths-streaming-only.json + */ /** * Sample code: List Paths which has streaming paths only. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void listPathsWhichHasStreamingPathsOnly( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .streamingLocators() .listPathsWithResponse("contoso", "contosomedia", "secureStreamingLocator", Context.NONE); } + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-locators-list-paths-streaming-and-download.json + */ /** * Sample code: List Paths which has streaming paths and download paths. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void listPathsWhichHasStreamingPathsAndDownloadPaths( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .streamingLocators() .listPathsWithResponse("contoso", "contosomedia", "clearStreamingLocator", Context.NONE); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingLocatorsListSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingLocatorsListSamples.java new file mode 100644 index 000000000000..fe1fa19201f6 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingLocatorsListSamples.java @@ -0,0 +1,22 @@ +// 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 StreamingLocators List. */ +public final class StreamingLocatorsListSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-locators-list.json + */ + /** + * Sample code: Lists Streaming Locators. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listsStreamingLocators(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.streamingLocators().list("contoso", "contosomedia", null, null, null, Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingPoliciesCreateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingPoliciesCreateSamples.java similarity index 89% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingPoliciesCreateSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingPoliciesCreateSamples.java index 001975282e34..963fbbe8f3e8 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingPoliciesCreateSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingPoliciesCreateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.resourcemanager.mediaservices.models.CbcsDrmConfiguration; import com.azure.resourcemanager.mediaservices.models.CencDrmConfiguration; @@ -24,14 +24,17 @@ /** Samples for StreamingPolicies Create. */ public final class StreamingPoliciesCreateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-policies-create-secure-streaming.json + */ /** * Sample code: Creates a Streaming Policy with secure streaming. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void createsAStreamingPolicyWithSecureStreaming( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .streamingPolicies() .define("UserCreatedSecureStreamingPolicy") .withExistingMediaService("contoso", "contosomedia") @@ -100,14 +103,17 @@ public static void createsAStreamingPolicyWithSecureStreaming( .create(); } + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-policies-create-commonEncryptionCenc-only.json + */ /** * Sample code: Creates a Streaming Policy with commonEncryptionCenc only. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void createsAStreamingPolicyWithCommonEncryptionCencOnly( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .streamingPolicies() .define("UserCreatedSecureStreamingPolicyWithCommonEncryptionCencOnly") .withExistingMediaService("contoso", "contosomedia") @@ -147,14 +153,17 @@ public static void createsAStreamingPolicyWithCommonEncryptionCencOnly( .create(); } + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-policies-create-commonEncryptionCbcs-only.json + */ /** * Sample code: Creates a Streaming Policy with commonEncryptionCbcs only. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void createsAStreamingPolicyWithCommonEncryptionCbcsOnly( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .streamingPolicies() .define("UserCreatedSecureStreamingPolicyWithCommonEncryptionCbcsOnly") .withExistingMediaService("contoso", "contosomedia") @@ -179,14 +188,17 @@ public static void createsAStreamingPolicyWithCommonEncryptionCbcsOnly( .create(); } + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-policies-create-clear.json + */ /** * Sample code: Creates a Streaming Policy with clear streaming. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void createsAStreamingPolicyWithClearStreaming( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .streamingPolicies() .define("UserCreatedClearStreamingPolicy") .withExistingMediaService("contoso", "contosomedia") @@ -201,14 +213,17 @@ public static void createsAStreamingPolicyWithClearStreaming( .create(); } + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-policies-create-envelopeEncryption-only.json + */ /** * Sample code: Creates a Streaming Policy with envelopeEncryption only. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void createsAStreamingPolicyWithEnvelopeEncryptionOnly( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .streamingPolicies() .define("UserCreatedSecureStreamingPolicyWithEnvelopeEncryptionOnly") .withExistingMediaService("contoso", "contosomedia") diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingPoliciesDeleteSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingPoliciesDeleteSamples.java similarity index 56% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingPoliciesDeleteSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingPoliciesDeleteSamples.java index 124eb52a4bd1..de0422b0ebdd 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingPoliciesDeleteSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingPoliciesDeleteSamples.java @@ -2,20 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; /** Samples for StreamingPolicies Delete. */ public final class StreamingPoliciesDeleteSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-policies-delete.json + */ /** * Sample code: Delete a Streaming Policy. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void deleteAStreamingPolicy( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + public static void deleteAStreamingPolicy(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .streamingPolicies() .deleteWithResponse( "contoso", "contosomedia", "secureStreamingPolicyWithCommonEncryptionCbcsOnly", Context.NONE); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingPoliciesGetSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingPoliciesGetSamples.java new file mode 100644 index 000000000000..f39b8a1596cd --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingPoliciesGetSamples.java @@ -0,0 +1,22 @@ +// 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 StreamingPolicies Get. */ +public final class StreamingPoliciesGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-policy-get-by-name.json + */ + /** + * Sample code: Get a Streaming Policy by name. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getAStreamingPolicyByName(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.streamingPolicies().getWithResponse("contoso", "contosomedia", "clearStreamingPolicy", Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingPoliciesListSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingPoliciesListSamples.java new file mode 100644 index 000000000000..75765bf311fd --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingPoliciesListSamples.java @@ -0,0 +1,22 @@ +// 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 StreamingPolicies List. */ +public final class StreamingPoliciesListSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/streaming-policies-list.json + */ + /** + * Sample code: Lists Streaming Policies. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listsStreamingPolicies(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.streamingPolicies().list("contoso", "contosomedia", null, null, null, Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TransformsCreateOrUpdateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TransformsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..282ebc7ed568 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TransformsCreateOrUpdateSamples.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.generated; + +import com.azure.resourcemanager.mediaservices.models.BuiltInStandardEncoderPreset; +import com.azure.resourcemanager.mediaservices.models.EncoderNamedPreset; +import com.azure.resourcemanager.mediaservices.models.TransformOutput; +import java.util.Arrays; + +/** Samples for Transforms CreateOrUpdate. */ +public final class TransformsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/transforms-create.json + */ + /** + * Sample code: Create or update a Transform. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void createOrUpdateATransform(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .transforms() + .define("createdTransform") + .withExistingMediaService("contosoresources", "contosomedia") + .withDescription("Example Transform to illustrate create and update.") + .withOutputs( + Arrays + .asList( + new TransformOutput() + .withPreset( + new BuiltInStandardEncoderPreset() + .withPresetName(EncoderNamedPreset.ADAPTIVE_STREAMING)))) + .create(); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TransformsDeleteSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TransformsDeleteSamples.java new file mode 100644 index 000000000000..b1a7abb76581 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TransformsDeleteSamples.java @@ -0,0 +1,22 @@ +// 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 Transforms Delete. */ +public final class TransformsDeleteSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/transforms-delete.json + */ + /** + * Sample code: Delete a Transform. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void deleteATransform(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.transforms().deleteWithResponse("contosoresources", "contosomedia", "sampleTransform", Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TransformsGetSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TransformsGetSamples.java new file mode 100644 index 000000000000..60c4ac926bc4 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TransformsGetSamples.java @@ -0,0 +1,22 @@ +// 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 Transforms Get. */ +public final class TransformsGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/transforms-get-by-name.json + */ + /** + * Sample code: Get a Transform by name. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getATransformByName(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.transforms().getWithResponse("contosoresources", "contosomedia", "sampleTransform", Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/TransformsListSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TransformsListSamples.java similarity index 60% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/TransformsListSamples.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TransformsListSamples.java index fdf318b783f4..cc2bef6aed0f 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/TransformsListSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TransformsListSamples.java @@ -2,20 +2,23 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.mediaservices; +package com.azure.resourcemanager.mediaservices.generated; import com.azure.core.util.Context; /** Samples for Transforms List. */ public final class TransformsListSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/transforms-list-all-filter-by-created.json + */ /** * Sample code: Lists the Transforms filter by created. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void listsTheTransformsFilterByCreated( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .transforms() .list( "contosoresources", @@ -26,14 +29,17 @@ public static void listsTheTransformsFilterByCreated( Context.NONE); } + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/transforms-list-all-filter-by-name.json + */ /** * Sample code: Lists the Transforms filter by name. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void listsTheTransformsFilterByName( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .transforms() .list( "contosoresources", @@ -43,14 +49,17 @@ public static void listsTheTransformsFilterByName( Context.NONE); } + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/transforms-list-all-filter-by-lastmodified.json + */ /** * Sample code: Lists the Transforms filter by lastmodified. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ public static void listsTheTransformsFilterByLastmodified( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager .transforms() .list( "contosoresources", @@ -61,13 +70,15 @@ public static void listsTheTransformsFilterByLastmodified( Context.NONE); } + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/transforms-list-all.json + */ /** * Sample code: Lists the Transforms. * - * @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework. + * @param manager Entry point to MediaServicesManager. */ - public static void listsTheTransforms( - com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { - mediaServicesManager.transforms().list("contosoresources", "contosomedia", null, null, Context.NONE); + public static void listsTheTransforms(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.transforms().list("contosoresources", "contosomedia", null, null, Context.NONE); } } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TransformsUpdateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TransformsUpdateSamples.java new file mode 100644 index 000000000000..cb3c54304905 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TransformsUpdateSamples.java @@ -0,0 +1,44 @@ +// 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; +import com.azure.resourcemanager.mediaservices.models.BuiltInStandardEncoderPreset; +import com.azure.resourcemanager.mediaservices.models.EncoderNamedPreset; +import com.azure.resourcemanager.mediaservices.models.Priority; +import com.azure.resourcemanager.mediaservices.models.Transform; +import com.azure.resourcemanager.mediaservices.models.TransformOutput; +import java.util.Arrays; + +/** Samples for Transforms Update. */ +public final class TransformsUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/transforms-update.json + */ + /** + * Sample code: Update a Transform. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void updateATransform(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + Transform resource = + manager + .transforms() + .getWithResponse("contosoresources", "contosomedia", "transformToUpdate", Context.NONE) + .getValue(); + resource + .update() + .withDescription("Example transform to illustrate update.") + .withOutputs( + Arrays + .asList( + new TransformOutput() + .withRelativePriority(Priority.HIGH) + .withPreset( + new BuiltInStandardEncoderPreset() + .withPresetName(EncoderNamedPreset.H264MULTIPLE_BITRATE720P)))) + .apply(); + } +}