From ed5ca3564b7a76611d3e89f7112082a412cf03f3 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 22 Feb 2022 19:56:55 +0000 Subject: [PATCH] CodeGen from PR 17540 in Azure/azure-rest-api-specs Merge edc1465ef8a8583840b7ed76e18903e9ec42d77a into 291dc1769270252821f53a9590d185dae8dc5775 --- .../CHANGELOG.md | 3 +- .../README.md | 60 +- .../SAMPLE.md | 3687 ++++++++++++++++- .../pom.xml | 3 +- .../mediaservices/MediaServicesManager.java | 93 +- .../fluent/AccountFiltersClient.java | 12 +- .../fluent/AssetFiltersClient.java | 12 +- .../mediaservices/fluent/AssetsClient.java | 19 +- .../fluent/AzureMediaServices.java | 41 +- .../fluent/ContentKeyPoliciesClient.java | 14 +- .../mediaservices/fluent/JobsClient.java | 14 +- .../fluent/LiveEventsClient.java | 62 +- .../fluent/LiveOutputsClient.java | 22 +- .../mediaservices/fluent/LocationsClient.java | 6 +- .../MediaServiceOperationResultsClient.java | 41 + .../MediaServiceOperationStatusesClient.java | 42 + .../fluent/MediaservicesClient.java | 88 +- .../fluent/OperationResultsClient.java | 54 + .../fluent/OperationStatusesClient.java | 54 + .../fluent/OperationsClient.java | 2 +- .../PrivateEndpointConnectionsClient.java | 29 +- .../fluent/PrivateLinkResourcesClient.java | 16 +- .../fluent/StreamingEndpointsClient.java | 86 +- .../fluent/StreamingLocatorsClient.java | 14 +- .../fluent/StreamingPoliciesClient.java | 10 +- .../mediaservices/fluent/TracksClient.java | 376 ++ .../fluent/TransformsClient.java | 12 +- .../fluent/models/AccountFilterInner.java | 64 +- .../fluent/models/AssetFilterInner.java | 64 +- .../fluent/models/AssetInner.java | 102 +- .../fluent/models/AssetProperties.java | 191 + .../fluent/models/AssetTrackInner.java | 77 + .../AssetTrackOperationStatusInner.java | 194 + .../fluent/models/AssetTrackProperties.java | 70 + .../fluent/models/ContentKeyPolicyInner.java | 69 +- .../mediaservices/fluent/models/JobInner.java | 132 +- .../fluent/models/JobProperties.java | 263 ++ .../fluent/models/LiveEventInner.java | 223 +- .../fluent/models/LiveEventProperties.java | 380 ++ .../fluent/models/LiveOutputInner.java | 135 +- .../fluent/models/LiveOutputProperties.java | 272 ++ .../fluent/models/MediaFilterProperties.java | 115 + .../fluent/models/MediaServiceInner.java | 151 +- .../MediaServiceOperationStatusInner.java | 194 + .../fluent/models/MediaServiceProperties.java | 220 + .../PrivateEndpointConnectionInner.java | 51 +- .../PrivateEndpointConnectionProperties.java | 110 + .../models/PrivateLinkResourceInner.java | 41 +- .../models/PrivateLinkResourceProperties.java | 81 + .../fluent/models/StreamingEndpointInner.java | 250 +- .../models/StreamingEndpointProperties.java | 385 ++ ...reamingEndpointSkuInfoListResultInner.java | 55 + .../fluent/models/StreamingLocatorInner.java | 150 +- .../models/StreamingLocatorProperties.java | 308 ++ .../fluent/models/StreamingPolicyInner.java | 101 +- .../models/StreamingPolicyProperties.java | 186 + .../fluent/models/TransformInner.java | 64 +- .../fluent/models/TransformProperties.java | 120 + .../AccountFiltersClientImpl.java | 54 +- .../implementation/AccountFiltersImpl.java | 2 +- .../AssetFiltersClientImpl.java | 55 +- .../implementation/AssetFiltersImpl.java | 2 +- .../implementation/AssetTrackImpl.java | 149 + .../AssetTrackOperationStatusImpl.java | 55 + .../implementation/AssetsClientImpl.java | 84 +- .../implementation/AssetsImpl.java | 2 +- .../AzureMediaServicesImpl.java | 86 +- .../ContentKeyPoliciesClientImpl.java | 67 +- .../ContentKeyPoliciesImpl.java | 2 +- .../implementation/JobsClientImpl.java | 58 +- .../implementation/JobsImpl.java | 2 +- .../implementation/LiveEventsClientImpl.java | 221 +- .../implementation/LiveOutputsClientImpl.java | 81 +- .../implementation/LocationsClientImpl.java | 20 +- .../implementation/MediaServiceImpl.java | 29 +- ...ediaServiceOperationResultsClientImpl.java | 221 + .../MediaServiceOperationResultsImpl.java | 62 + .../MediaServiceOperationStatusImpl.java | 55 + ...diaServiceOperationStatusesClientImpl.java | 223 + .../MediaServiceOperationStatusesImpl.java | 62 + .../MediaservicesClientImpl.java | 356 +- .../implementation/MediaservicesImpl.java | 2 +- .../OperationResultsClientImpl.java | 275 ++ .../implementation/OperationResultsImpl.java | 72 + .../OperationStatusesClientImpl.java | 275 ++ .../implementation/OperationStatusesImpl.java | 71 + .../implementation/OperationsClientImpl.java | 8 +- .../PrivateEndpointConnectionsClientImpl.java | 84 +- .../PrivateEndpointConnectionsImpl.java | 2 +- .../PrivateLinkResourcesClientImpl.java | 40 +- .../implementation/StreamingEndpointImpl.java | 14 +- ...treamingEndpointSkuInfoListResultImpl.java | 41 + .../StreamingEndpointsClientImpl.java | 369 +- .../StreamingEndpointsImpl.java | 28 + .../StreamingLocatorsClientImpl.java | 69 +- .../implementation/StreamingLocatorsImpl.java | 2 +- .../StreamingPoliciesClientImpl.java | 48 +- .../implementation/StreamingPoliciesImpl.java | 2 +- .../implementation/TracksClientImpl.java | 1766 ++++++++ .../implementation/TracksImpl.java | 228 + .../implementation/TransformsClientImpl.java | 58 +- .../implementation/TransformsImpl.java | 2 +- .../mediaservices/models/AacAudio.java | 6 +- .../models/AbsoluteClipTime.java | 6 +- .../mediaservices/models/AccountFilters.java | 14 +- .../models/ArmStreamingEndpointCapacity.java | 117 + .../ArmStreamingEndpointCurrentSku.java | 65 + .../models/ArmStreamingEndpointSku.java | 39 + .../models/ArmStreamingEndpointSkuInfo.java | 108 + .../mediaservices/models/Asset.java | 7 +- .../mediaservices/models/AssetFilters.java | 14 +- .../mediaservices/models/AssetTrack.java | 181 + .../models/AssetTrackCollection.java | 55 + .../models/AssetTrackOperationStatus.java | 61 + .../mediaservices/models/Assets.java | 21 +- .../mediaservices/models/Audio.java | 4 +- .../models/AudioAnalyzerPreset.java | 6 +- .../mediaservices/models/AudioOverlay.java | 6 +- .../mediaservices/models/AudioTrack.java | 29 + .../models/AudioTrackDescriptor.java | 4 +- .../models/BuiltInStandardEncoderPreset.java | 22 +- .../mediaservices/models/ClipTime.java | 4 +- .../mediaservices/models/Codec.java | 4 +- .../models/ContentKeyPolicies.java | 16 +- .../models/ContentKeyPolicy.java | 2 +- ...ContentKeyPolicyClearKeyConfiguration.java | 6 +- .../models/ContentKeyPolicyConfiguration.java | 4 +- ...ContentKeyPolicyFairPlayConfiguration.java | 6 +- .../ContentKeyPolicyOpenRestriction.java | 6 +- ...ontentKeyPolicyPlayReadyConfiguration.java | 6 +- ...ayReadyContentEncryptionKeyFromHeader.java | 6 +- ...ContentEncryptionKeyFromKeyIdentifier.java | 6 +- ...tKeyPolicyPlayReadyContentKeyLocation.java | 4 +- .../models/ContentKeyPolicyRestriction.java | 4 +- .../ContentKeyPolicyRestrictionTokenKey.java | 4 +- .../models/ContentKeyPolicyRsaTokenKey.java | 6 +- .../ContentKeyPolicySymmetricTokenKey.java | 6 +- .../ContentKeyPolicyTokenRestriction.java | 6 +- .../ContentKeyPolicyUnknownConfiguration.java | 6 +- .../ContentKeyPolicyUnknownRestriction.java | 6 +- ...ContentKeyPolicyWidevineConfiguration.java | 6 +- ...ntentKeyPolicyX509CertificateTokenKey.java | 6 +- .../mediaservices/models/CopyAudio.java | 6 +- .../mediaservices/models/CopyVideo.java | 6 +- .../models/FaceDetectorPreset.java | 8 +- .../mediaservices/models/Format.java | 4 +- .../models/FromAllInputFile.java | 6 +- .../models/FromEachInputFile.java | 6 +- .../mediaservices/models/H264Layer.java | 45 +- .../models/H264RateControlMode.java | 37 + .../mediaservices/models/H264Video.java | 90 +- .../mediaservices/models/H265Layer.java | 45 +- .../mediaservices/models/H265Video.java | 6 +- .../mediaservices/models/H265VideoLayer.java | 12 - .../models/H265VideoProfile.java | 3 + .../mediaservices/models/HlsSettings.java | 102 + .../mediaservices/models/Image.java | 4 +- .../mediaservices/models/ImageFormat.java | 4 +- .../mediaservices/models/InputDefinition.java | 4 +- .../mediaservices/models/InputFile.java | 6 +- .../mediaservices/models/Job.java | 2 +- .../mediaservices/models/JobInput.java | 4 +- .../mediaservices/models/JobInputAsset.java | 6 +- .../mediaservices/models/JobInputClip.java | 4 +- .../mediaservices/models/JobInputHttp.java | 6 +- .../models/JobInputSequence.java | 6 +- .../mediaservices/models/JobInputs.java | 6 +- .../mediaservices/models/JobOutput.java | 4 +- .../mediaservices/models/JobOutputAsset.java | 6 +- .../mediaservices/models/Jobs.java | 16 +- .../mediaservices/models/JpgFormat.java | 6 +- .../mediaservices/models/JpgImage.java | 6 +- .../mediaservices/models/JpgLayer.java | 8 +- .../mediaservices/models/Layer.java | 17 - .../models/LiveEventEncoding.java | 29 +- .../models/LiveEventListResult.java | 2 +- .../mediaservices/models/LiveEvents.java | 10 +- .../models/LiveOutputListResult.java | 2 +- .../mediaservices/models/LiveOutputs.java | 10 +- .../mediaservices/models/Locations.java | 6 +- .../mediaservices/models/MediaService.java | 35 +- .../models/MediaServiceIdentity.java | 2 + .../models/MediaServiceOperationResults.java | 36 + ...ediaServiceOperationResultsGetHeaders.java | 102 + ...diaServiceOperationResultsGetResponse.java | 38 + .../models/MediaServiceOperationStatus.java | 61 + .../models/MediaServiceOperationStatuses.java | 36 + .../models/MediaServiceUpdate.java | 127 +- .../mediaservices/models/Mediaservices.java | 26 +- .../MediaservicesCreateOrUpdateHeaders.java | 102 + .../MediaservicesCreateOrUpdateResponse.java | 38 + .../models/MediaservicesUpdateHeaders.java | 102 + .../models/MediaservicesUpdateResponse.java | 37 + .../mediaservices/models/Mp4Format.java | 6 +- .../models/MultiBitrateFormat.java | 4 +- .../models/OperationResults.java | 49 + .../models/OperationResultsGetHeaders.java | 102 + .../models/OperationResultsGetResponse.java | 37 + .../models/OperationStatuses.java | 49 + .../mediaservices/models/Operations.java | 2 +- .../mediaservices/models/Overlay.java | 4 +- .../mediaservices/models/PngFormat.java | 6 +- .../mediaservices/models/PngImage.java | 6 +- .../mediaservices/models/PngLayer.java | 8 +- .../mediaservices/models/Preset.java | 4 +- .../models/PrivateEndpointConnections.java | 37 +- .../models/PrivateLinkResources.java | 16 +- .../models/ProvisioningState.java | 37 + .../models/SelectAudioTrackByAttribute.java | 6 +- .../models/SelectAudioTrackById.java | 6 +- .../models/SelectVideoTrackByAttribute.java | 6 +- .../models/SelectVideoTrackById.java | 6 +- .../models/StandardEncoderPreset.java | 6 +- .../models/StreamOptionsFlag.java | 3 + .../models/StreamingEndpoint.java | 35 +- .../models/StreamingEndpointListResult.java | 2 +- .../StreamingEndpointSkuInfoListResult.java | 26 + .../models/StreamingEndpoints.java | 38 +- .../models/StreamingLocator.java | 4 +- .../models/StreamingLocators.java | 18 +- .../models/StreamingPolicies.java | 14 +- .../mediaservices/models/TextTrack.java | 168 + .../mediaservices/models/TrackBase.java | 37 + .../mediaservices/models/TrackDescriptor.java | 4 +- .../mediaservices/models/Tracks.java | 182 + .../models/TracksCreateOrUpdateHeaders.java | 102 + .../models/TracksCreateOrUpdateResponse.java | 37 + .../models/TracksDeleteHeaders.java | 102 + .../models/TracksDeleteResponse.java | 26 + .../models/TracksUpdateHeaders.java | 102 + .../models/TracksUpdateResponse.java | 37 + .../models/TracksUpdateTrackDataHeaders.java | 102 + .../models/TracksUpdateTrackDataResponse.java | 26 + .../mediaservices/models/Transforms.java | 14 +- .../models/TransportStreamFormat.java | 6 +- .../mediaservices/models/UtcClipTime.java | 6 +- .../mediaservices/models/Video.java | 4 +- .../models/VideoAnalyzerPreset.java | 6 +- .../mediaservices/models/VideoLayer.java | 12 - .../mediaservices/models/VideoOverlay.java | 6 +- .../mediaservices/models/VideoTrack.java | 29 + .../models/VideoTrackDescriptor.java | 4 +- .../mediaservices/models/Visibility.java | 34 + .../AccountFiltersGetSamples.java | 22 - .../AccountFiltersListSamples.java | 20 - .../AssetFiltersListSamples.java | 20 - .../mediaservices/AssetsDeleteSamples.java | 20 - .../mediaservices/AssetsGetSamples.java | 20 - .../mediaservices/AssetsListSamples.java | 48 - ...ntentKeyPoliciesCreateOrUpdateSamples.java | 105 - .../mediaservices/JobsGetSamples.java | 22 - .../LiveEventsAllocateSamples.java | 20 - .../LiveEventsDeleteSamples.java | 20 - .../mediaservices/LiveEventsGetSamples.java | 22 - .../mediaservices/LiveEventsListSamples.java | 20 - .../mediaservices/LiveEventsResetSamples.java | 20 - .../mediaservices/LiveEventsStartSamples.java | 20 - .../LiveOutputsDeleteSamples.java | 22 - .../mediaservices/LiveOutputsListSamples.java | 20 - .../mediaservices/OperationsListSamples.java | 20 - .../PrivateLinkResourcesGetSamples.java | 22 - .../PrivateLinkResourcesListSamples.java | 20 - .../StreamingEndpointsDeleteSamples.java | 22 - .../StreamingEndpointsListSamples.java | 20 - .../StreamingEndpointsStartSamples.java | 22 - .../StreamingEndpointsStopSamples.java | 22 - .../StreamingLocatorsListSamples.java | 20 - .../StreamingPoliciesGetSamples.java | 22 - .../StreamingPoliciesListSamples.java | 20 - .../TransformsCreateOrUpdateSamples.java | 28 - .../TransformsDeleteSamples.java | 22 - .../mediaservices/TransformsGetSamples.java | 22 - .../TransformsUpdateSamples.java | 35 - .../AccountFiltersCreateOrUpdateSamples.java | 12 +- .../AccountFiltersDeleteSamples.java | 12 +- .../generated/AccountFiltersGetSamples.java | 22 + .../generated/AccountFiltersListSamples.java | 22 + .../AccountFiltersUpdateSamples.java | 12 +- .../AssetFiltersCreateOrUpdateSamples.java | 12 +- .../AssetFiltersDeleteSamples.java | 12 +- .../AssetFiltersGetSamples.java | 12 +- .../generated/AssetFiltersListSamples.java | 22 + .../AssetFiltersUpdateSamples.java | 12 +- .../AssetsCreateOrUpdateSamples.java | 12 +- .../generated/AssetsDeleteSamples.java | 22 + .../AssetsGetEncryptionKeySamples.java | 11 +- .../generated/AssetsGetSamples.java | 22 + .../AssetsListContainerSasSamples.java | 12 +- .../generated/AssetsListSamples.java | 55 + .../AssetsListStreamingLocatorsSamples.java | 12 +- .../{ => generated}/AssetsUpdateSamples.java | 15 +- ...ntentKeyPoliciesCreateOrUpdateSamples.java | 185 + .../ContentKeyPoliciesDeleteSamples.java | 12 +- ...GetPolicyPropertiesWithSecretsSamples.java | 11 +- .../ContentKeyPoliciesGetSamples.java | 11 +- .../ContentKeyPoliciesListSamples.java | 29 +- .../ContentKeyPoliciesUpdateSamples.java | 20 +- .../{ => generated}/JobsCancelJobSamples.java | 11 +- .../{ => generated}/JobsCreateSamples.java | 19 +- .../{ => generated}/JobsDeleteSamples.java | 11 +- .../generated/JobsGetSamples.java | 22 + .../{ => generated}/JobsListSamples.java | 75 +- .../{ => generated}/JobsUpdateSamples.java | 19 +- .../generated/LiveEventsAllocateSamples.java | 22 + .../LiveEventsCreateSamples.java | 12 +- .../generated/LiveEventsDeleteSamples.java | 22 + .../generated/LiveEventsGetSamples.java | 22 + .../generated/LiveEventsListSamples.java | 22 + .../generated/LiveEventsResetSamples.java | 22 + .../generated/LiveEventsStartSamples.java | 22 + .../LiveEventsStopSamples.java | 12 +- .../LiveEventsUpdateSamples.java | 12 +- .../LiveOutputsCreateSamples.java | 12 +- .../generated/LiveOutputsDeleteSamples.java | 22 + .../LiveOutputsGetSamples.java | 12 +- .../generated/LiveOutputsListSamples.java | 22 + ...LocationsCheckNameAvailabilitySamples.java | 12 +- ...ediaServiceOperationResultsGetSamples.java | 25 + ...diaServiceOperationStatusesGetSamples.java | 55 + .../MediaservicesCreateOrUpdateSamples.java | 29 +- .../MediaservicesDeleteSamples.java | 11 +- ...ediaservicesGetByResourceGroupSamples.java | 11 +- ...diaservicesListByResourceGroupSamples.java | 11 +- .../MediaservicesListEdgePoliciesSamples.java | 12 +- .../MediaservicesListSamples.java | 11 +- .../MediaservicesSyncStorageKeysSamples.java | 11 +- .../MediaservicesUpdateSamples.java | 14 +- .../generated/OperationResultsGetSamples.java | 31 + .../OperationStatusesGetSamples.java | 73 + .../generated/OperationsListSamples.java | 22 + ...pointConnectionsCreateOrUpdateSamples.java | 11 +- ...ivateEndpointConnectionsDeleteSamples.java | 11 +- .../PrivateEndpointConnectionsGetSamples.java | 11 +- ...PrivateEndpointConnectionsListSamples.java | 11 +- .../PrivateLinkResourcesGetSamples.java | 22 + .../PrivateLinkResourcesListSamples.java | 22 + .../StreamingEndpointsCreateSamples.java | 12 +- .../StreamingEndpointsDeleteSamples.java | 22 + .../StreamingEndpointsGetSamples.java | 11 +- .../StreamingEndpointsListSamples.java | 22 + .../StreamingEndpointsScaleSamples.java | 12 +- .../StreamingEndpointsSkusSamples.java | 24 + .../StreamingEndpointsStartSamples.java | 22 + .../StreamingEndpointsStopSamples.java | 22 + .../StreamingEndpointsUpdateSamples.java | 12 +- .../StreamingLocatorsCreateSamples.java | 29 +- .../StreamingLocatorsDeleteSamples.java | 12 +- .../StreamingLocatorsGetSamples.java | 13 +- ...reamingLocatorsListContentKeysSamples.java | 12 +- .../StreamingLocatorsListPathsSamples.java | 20 +- .../StreamingLocatorsListSamples.java | 22 + .../StreamingPoliciesCreateSamples.java | 47 +- .../StreamingPoliciesDeleteSamples.java | 12 +- .../StreamingPoliciesGetSamples.java | 22 + .../StreamingPoliciesListSamples.java | 22 + .../TracksCreateOrUpdateSamples.java | 32 + .../generated/TracksDeleteSamples.java | 22 + .../generated/TracksGetSamples.java | 22 + .../generated/TracksListSamples.java | 22 + .../generated/TracksUpdateSamples.java | 29 + .../TracksUpdateTrackDataSamples.java | 22 + .../TransformsCreateOrUpdateSamples.java | 37 + .../generated/TransformsDeleteSamples.java | 22 + .../generated/TransformsGetSamples.java | 22 + .../TransformsListSamples.java | 47 +- .../generated/TransformsUpdateSamples.java | 44 + 366 files changed, 18194 insertions(+), 3497 deletions(-) create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/MediaServiceOperationResultsClient.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/MediaServiceOperationStatusesClient.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/OperationResultsClient.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/OperationStatusesClient.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/TracksClient.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/AssetProperties.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/AssetTrackInner.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/AssetTrackOperationStatusInner.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/AssetTrackProperties.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/JobProperties.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/LiveEventProperties.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/LiveOutputProperties.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/MediaFilterProperties.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/MediaServiceOperationStatusInner.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/MediaServiceProperties.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/PrivateEndpointConnectionProperties.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/PrivateLinkResourceProperties.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/StreamingEndpointProperties.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/StreamingEndpointSkuInfoListResultInner.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/StreamingLocatorProperties.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/StreamingPolicyProperties.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/TransformProperties.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetTrackImpl.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetTrackOperationStatusImpl.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationResultsClientImpl.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationResultsImpl.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationStatusImpl.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationStatusesClientImpl.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationStatusesImpl.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationResultsClientImpl.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationResultsImpl.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationStatusesClientImpl.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationStatusesImpl.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingEndpointSkuInfoListResultImpl.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TracksClientImpl.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TracksImpl.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ArmStreamingEndpointCapacity.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ArmStreamingEndpointCurrentSku.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ArmStreamingEndpointSku.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ArmStreamingEndpointSkuInfo.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AssetTrack.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AssetTrackCollection.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AssetTrackOperationStatus.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AudioTrack.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H264RateControlMode.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/HlsSettings.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationResults.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationResultsGetHeaders.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationResultsGetResponse.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationStatus.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationStatuses.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaservicesCreateOrUpdateHeaders.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaservicesCreateOrUpdateResponse.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaservicesUpdateHeaders.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaservicesUpdateResponse.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/OperationResults.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/OperationResultsGetHeaders.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/OperationResultsGetResponse.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/OperationStatuses.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ProvisioningState.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingEndpointSkuInfoListResult.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TextTrack.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TrackBase.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Tracks.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksCreateOrUpdateHeaders.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksCreateOrUpdateResponse.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksDeleteHeaders.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksDeleteResponse.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksUpdateHeaders.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksUpdateResponse.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksUpdateTrackDataHeaders.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksUpdateTrackDataResponse.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoTrack.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Visibility.java delete mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AccountFiltersGetSamples.java delete mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AccountFiltersListSamples.java delete mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetFiltersListSamples.java delete mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsDeleteSamples.java delete mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsGetSamples.java delete mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsListSamples.java delete mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/ContentKeyPoliciesCreateOrUpdateSamples.java delete mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/JobsGetSamples.java delete mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsAllocateSamples.java delete mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsDeleteSamples.java delete mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsGetSamples.java delete mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsListSamples.java delete mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsResetSamples.java delete mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveEventsStartSamples.java delete mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveOutputsDeleteSamples.java delete mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/LiveOutputsListSamples.java delete mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/OperationsListSamples.java delete mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/PrivateLinkResourcesGetSamples.java delete mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/PrivateLinkResourcesListSamples.java delete mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsDeleteSamples.java delete mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsListSamples.java delete mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsStartSamples.java delete mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingEndpointsStopSamples.java delete mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingLocatorsListSamples.java delete mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingPoliciesGetSamples.java delete mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/StreamingPoliciesListSamples.java delete mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/TransformsCreateOrUpdateSamples.java delete mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/TransformsDeleteSamples.java delete mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/TransformsGetSamples.java delete mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/TransformsUpdateSamples.java rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/AccountFiltersCreateOrUpdateSamples.java (89%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/AccountFiltersDeleteSamples.java (55%) create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AccountFiltersGetSamples.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AccountFiltersListSamples.java rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/AccountFiltersUpdateSamples.java (76%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/AssetFiltersCreateOrUpdateSamples.java (89%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/AssetFiltersDeleteSamples.java (57%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/AssetFiltersGetSamples.java (56%) create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetFiltersListSamples.java rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/AssetFiltersUpdateSamples.java (76%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/AssetsCreateOrUpdateSamples.java (60%) create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetsDeleteSamples.java rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/AssetsGetEncryptionKeySamples.java (66%) create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetsGetSamples.java rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/AssetsListContainerSasSamples.java (70%) create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/AssetsListSamples.java rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/AssetsListStreamingLocatorsSamples.java (55%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/AssetsUpdateSamples.java (51%) create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/ContentKeyPoliciesCreateOrUpdateSamples.java rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/ContentKeyPoliciesDeleteSamples.java (56%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/ContentKeyPoliciesGetPolicyPropertiesWithSecretsSamples.java (69%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/ContentKeyPoliciesGetSamples.java (66%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/ContentKeyPoliciesListSamples.java (59%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/ContentKeyPoliciesUpdateSamples.java (71%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/JobsCancelJobSamples.java (62%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/JobsCreateSamples.java (61%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/JobsDeleteSamples.java (62%) create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/JobsGetSamples.java rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/JobsListSamples.java (61%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/JobsUpdateSamples.java (58%) create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsAllocateSamples.java rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/LiveEventsCreateSamples.java (88%) create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsDeleteSamples.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsGetSamples.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsListSamples.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsResetSamples.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveEventsStartSamples.java rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/LiveEventsStopSamples.java (62%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/LiveEventsUpdateSamples.java (87%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/LiveOutputsCreateSamples.java (68%) create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveOutputsDeleteSamples.java rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/LiveOutputsGetSamples.java (54%) create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LiveOutputsListSamples.java rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/LocationsCheckNameAvailabilitySamples.java (62%) create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaServiceOperationResultsGetSamples.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaServiceOperationStatusesGetSamples.java rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/MediaservicesCreateOrUpdateSamples.java (73%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/MediaservicesDeleteSamples.java (56%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/MediaservicesGetByResourceGroupSamples.java (56%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/MediaservicesListByResourceGroupSamples.java (57%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/MediaservicesListEdgePoliciesSamples.java (62%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/MediaservicesListSamples.java (57%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/MediaservicesSyncStorageKeysSamples.java (71%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/MediaservicesUpdateSamples.java (71%) create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/OperationResultsGetSamples.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/OperationStatusesGetSamples.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/OperationsListSamples.java rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/PrivateEndpointConnectionsCreateOrUpdateSamples.java (80%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/PrivateEndpointConnectionsDeleteSamples.java (67%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/PrivateEndpointConnectionsGetSamples.java (66%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/PrivateEndpointConnectionsListSamples.java (55%) create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateLinkResourcesGetSamples.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateLinkResourcesListSamples.java rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/StreamingEndpointsCreateSamples.java (87%) create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsDeleteSamples.java rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/StreamingEndpointsGetSamples.java (66%) create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsListSamples.java rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/StreamingEndpointsScaleSamples.java (63%) create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsSkusSamples.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsStartSamples.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsStopSamples.java rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/StreamingEndpointsUpdateSamples.java (75%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/StreamingLocatorsCreateSamples.java (79%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/StreamingLocatorsDeleteSamples.java (54%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/StreamingLocatorsGetSamples.java (53%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/StreamingLocatorsListContentKeysSamples.java (55%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/StreamingLocatorsListPathsSamples.java (62%) create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingLocatorsListSamples.java rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/StreamingPoliciesCreateSamples.java (89%) rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/StreamingPoliciesDeleteSamples.java (56%) create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingPoliciesGetSamples.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingPoliciesListSamples.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TracksCreateOrUpdateSamples.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TracksDeleteSamples.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TracksGetSamples.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TracksListSamples.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TracksUpdateSamples.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TracksUpdateTrackDataSamples.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TransformsCreateOrUpdateSamples.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TransformsDeleteSamples.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TransformsGetSamples.java rename sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/{ => generated}/TransformsListSamples.java (52%) create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TransformsUpdateSamples.java diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/CHANGELOG.md b/sdk/mediaservices/azure-resourcemanager-mediaservices/CHANGELOG.md index f81ab5a8b13e3..90f5951210673 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 (2022-02-22) +- Azure Resource Manager MediaServices client library for Java. This package contains Microsoft Azure SDK for MediaServices Management SDK. This Swagger was generated by the API Framework. Package tag package-2021-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## 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 254fd1343a461..f60f86b63f5b2 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/README.md +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/README.md @@ -2,7 +2,7 @@ Azure Resource Manager MediaServices client library for Java. -This package contains Microsoft Azure SDK for MediaServices Management SDK. This Swagger was generated by the API Framework. Package tag package-2021-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for MediaServices Management SDK. This Swagger was generated by the API Framework. Package tag package-2021-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-mediaservices - 1.1.0-beta.2 + 1.1.0-beta.3 ``` [//]: # ({x-version-update-end}) @@ -74,6 +74,62 @@ See [API design][design] for general introduction on design and key concepts on ## Examples +```java +// storage account +StorageAccount storageAccount = storageManager.storageAccounts().define(STORAGE_ACCOUNT) + .withRegion(REGION) + .withExistingResourceGroup(resourceGroup) + .create(); + +// media service account +MediaService account = manager.mediaservices().define(ACCOUNT) + .withRegion(Region.US_WEST3) + .withExistingResourceGroup(resourceGroup) + .withStorageAccounts(Collections.singletonList( + new com.azure.resourcemanager.mediaservices.models.StorageAccount() + .withId(storageAccount.id()) + .withType(StorageAccountType.PRIMARY))) + .create(); + +// transform +Transform transform = manager.transforms() + .define("transform1") + .withExistingMediaService(resourceGroup, ACCOUNT) + .withOutputs(Collections.singletonList(new TransformOutput() + .withPreset(new BuiltInStandardEncoderPreset() + .withPresetName(EncoderNamedPreset.CONTENT_AWARE_ENCODING)))) + .create(); + +// output asset +Asset asset = manager.assets() + .define("output1") + .withExistingMediaService(resourceGroup, ACCOUNT) + .create(); + +// input uri +String jobHttpBaseUri = "https://nimbuscdn-nimbuspm.streaming.mediaservices.windows.net/2b533311-b215-4409-80af-529c3e853622/"; +String jobFile = "Ignite-short.mp4"; + +// job +Job job = manager.jobs().define("job1") + .withExistingTransform(resourceGroup, ACCOUNT, "transform1") + .withInput(new JobInputHttp() + .withFiles(Collections.singletonList(jobFile)) + .withBaseUri(jobHttpBaseUri) + .withLabel("input1")) + .withOutputs(Collections.singletonList(new JobOutputAsset().withAssetName("output1"))) + .create(); + +// wait for job completion +JobState jobState = job.state(); +while (!(jobState == JobState.CANCELED || jobState == JobState.ERROR || jobState == JobState.FINISHED)) { + sleepIfRunningAgainstService(10 * 1000); // wait 10 seconds + jobState = job.refresh().state(); +} + +// refresh output asset after job finished +asset.refresh(); +``` [Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mediaservices/azure-resourcemanager-mediaservices/SAMPLE.md) diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/SAMPLE.md b/sdk/mediaservices/azure-resourcemanager-mediaservices/SAMPLE.md index fe21e814f9235..295aeae7c81d2 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/SAMPLE.md +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/SAMPLE.md @@ -1,132 +1,3577 @@ # 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) + +## MediaServiceOperationResults + +- [Get](#mediaserviceoperationresults_get) + +## MediaServiceOperationStatuses + +- [Get](#mediaserviceoperationstatuses_get) + +## 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) + +## OperationResults + +- [Get](#operationresults_get) + +## OperationStatuses + +- [Get](#operationstatuses_get) + +## 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) +- [Skus](#streamingendpoints_skus) +- [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) + +## Tracks + +- [CreateOrUpdate](#tracks_createorupdate) +- [Delete](#tracks_delete) +- [Get](#tracks_get) +- [List](#tracks_list) +- [Update](#tracks_update) +- [UpdateTrackData](#tracks_updatetrackdata) + +## 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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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.JobInputAsset; +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-11-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 JobInputAsset().withAssetName("job1-InputAsset")) + .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-11-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-11-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-11-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-11-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-11-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-11-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-11-01T00:00:10.0000000Z and properties/lastmodified le" + + " 2021-11-01T00:00:20.0000000Z", + "properties/lastmodified desc", + Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-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-11-01T00:00:10.0000000Z and properties/created le" + + " 2021-11-01T00:00:20.0000000Z", + "properties/created", + Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-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-11-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.JobInputAsset; +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-11-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 JobInputAsset().withAssetName("job1-InputAsset")) + .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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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); + } +} +``` + +### MediaServiceOperationResults_Get + +```java +import com.azure.core.util.Context; + +/** Samples for MediaServiceOperationResults Get. */ +public final class MediaServiceOperationResultsGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/media-service-operation-result-by-id.json + */ + /** + * Sample code: Get status of asynchronous operation. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getStatusOfAsynchronousOperation( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .mediaServiceOperationResults() + .getWithResponse("westus", "6FBA62C4-99B5-4FF8-9826-FC4744A8864F", Context.NONE); + } +} +``` + +### MediaServiceOperationStatuses_Get + +```java +import com.azure.core.util.Context; + +/** Samples for MediaServiceOperationStatuses Get. */ +public final class MediaServiceOperationStatusesGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/media-service-operation-status-by-id-non-terminal-state-failed.json + */ + /** + * Sample code: Get status of asynchronous operation when it is completed with error. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getStatusOfAsynchronousOperationWhenItIsCompletedWithError( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .mediaServiceOperationStatuses() + .getWithResponse("westus", "D612C429-2526-49D5-961B-885AE11406FD", Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/media-service-operation-status-by-id-terminal-state.json + */ + /** + * Sample code: Get status of asynchronous operation when it is completed. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getStatusOfAsynchronousOperationWhenItIsCompleted( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .mediaServiceOperationStatuses() + .getWithResponse("westus", "D612C429-2526-49D5-961B-885AE11406FD", Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/media-service-operation-status-by-id-non-terminal-state.json + */ + /** + * Sample code: Get status of asynchronous operation when it is ongoing. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getStatusOfAsynchronousOperationWhenItIsOngoing( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .mediaServiceOperationStatuses() + .getWithResponse("westus", "D612C429-2526-49D5-961B-885AE11406FD", Context.NONE); + } +} +``` + +### Mediaservices_CreateOrUpdate + +```java +import com.azure.resourcemanager.mediaservices.models.AccessControl; +import com.azure.resourcemanager.mediaservices.models.AccountEncryption; +import com.azure.resourcemanager.mediaservices.models.AccountEncryptionKeyType; +import com.azure.resourcemanager.mediaservices.models.DefaultAction; +import com.azure.resourcemanager.mediaservices.models.KeyDelivery; +import com.azure.resourcemanager.mediaservices.models.MediaServiceIdentity; +import com.azure.resourcemanager.mediaservices.models.PublicNetworkAccess; +import com.azure.resourcemanager.mediaservices.models.ResourceIdentity; +import com.azure.resourcemanager.mediaservices.models.StorageAccount; +import com.azure.resourcemanager.mediaservices.models.StorageAccountType; +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-11-01/examples/async-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/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1", + new UserAssignedManagedIdentity(), + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/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/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1") + .withUseSystemAssignedIdentity(false)))) + .withStorageAuthentication(StorageAuthentication.MANAGED_IDENTITY) + .withEncryption( + new AccountEncryption() + .withType(AccountEncryptionKeyType.CUSTOMER_KEY) + .withIdentity( + new ResourceIdentity() + .withUserAssignedIdentity( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1") + .withUseSystemAssignedIdentity(false))) + .withKeyDelivery( + new KeyDelivery().withAccessControl(new AccessControl().withDefaultAction(DefaultAction.ALLOW))) + .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) + .create(); + } + + @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-11-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-11-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-11-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-11-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-11-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-11-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-11-01/examples/async-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; + } +} +``` + +### OperationResults_Get + +```java +import com.azure.core.util.Context; + +/** Samples for OperationResults Get. */ +public final class OperationResultsGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/asset-tracks-operation-result-by-id.json + */ + /** + * Sample code: Get result of asynchronous operation. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getResultOfAsynchronousOperation( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .operationResults() + .getWithResponse( + "contoso", + "contosomedia", + "ClimbingMountRainer", + "text1", + "e78f8d40-7aaa-4f2f-8ae6-73987e7c5a08", + Context.NONE); + } +} +``` + +### OperationStatuses_Get + +```java +import com.azure.core.util.Context; + +/** Samples for OperationStatuses Get. */ +public final class OperationStatusesGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/asset-tracks-operation-status-by-id-terminal-state-failed.json + */ + /** + * Sample code: Get status of asynchronous operation when it is completed with error. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getStatusOfAsynchronousOperationWhenItIsCompletedWithError( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .operationStatuses() + .getWithResponse( + "contoso", + "contosomedia", + "ClimbingMountRainer", + "text1", + "86835197-3b47-402e-b313-70b82eaba296", + Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/asset-tracks-operation-status-by-id-terminal-state.json + */ + /** + * Sample code: Get status of asynchronous operation when it is completed. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getStatusOfAsynchronousOperationWhenItIsCompleted( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .operationStatuses() + .getWithResponse( + "contoso", + "contosomedia", + "ClimbingMountRainer", + "text1", + "e78f8d40-7aaa-4f2f-8ae6-73987e7c5a08", + Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/asset-tracks-operation-status-by-id-non-terminal-state.json + */ + /** + * Sample code: Get status of asynchronous operation when it is ongoing. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getStatusOfAsynchronousOperationWhenItIsOngoing( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .operationStatuses() + .getWithResponse( + "contoso", + "contosomedia", + "ClimbingMountRainer", + "text1", + "5827d9a1-1fb4-4e54-ac40-8eeed9b862c8", + Context.NONE); + } +} +``` + +### 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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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_Skus + +```java +import com.azure.core.util.Context; + +/** Samples for StreamingEndpoints Skus. */ +public final class StreamingEndpointsSkusSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/streamingendpoint-list-skus.json + */ + /** + * Sample code: List a streaming endpoint sku. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listAStreamingEndpointSku(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .streamingEndpoints() + .skusWithResponse("mediaresources", "slitestmedia10", "myStreamingEndpoint1", 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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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-11-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); + } +} +``` + +### Tracks_CreateOrUpdate + +```java +import com.azure.resourcemanager.mediaservices.models.TextTrack; +import com.azure.resourcemanager.mediaservices.models.Visibility; + +/** Samples for Tracks CreateOrUpdate. */ +public final class TracksCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/asset-tracks-create.json + */ + /** + * Sample code: Creates a Track. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void createsATrack(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .tracks() + .define("text3") + .withExistingAsset("contoso", "contosomedia", "ClimbingMountRainer") + .withTrack( + new TextTrack() + .withFileName("text3.ttml") + .withDisplayName("A new track") + .withPlayerVisibility(Visibility.VISIBLE)) + .create(); + } +} +``` + +### Tracks_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Tracks Delete. */ +public final class TracksDeleteSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/asset-tracks-delete.json + */ + /** + * Sample code: Delete a Track. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void deleteATrack(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.tracks().delete("contoso", "contosomedia", "ClimbingMountRainer", "text2", Context.NONE); + } +} +``` + +### Tracks_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Tracks Get. */ +public final class TracksGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/asset-tracks-get-by-name.json + */ + /** + * Sample code: Get a Track by name. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getATrackByName(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.tracks().getWithResponse("contoso", "contosomedia", "ClimbingMountRainer", "text1", Context.NONE); + } +} +``` + +### Tracks_List + +```java +import com.azure.core.util.Context; + +/** Samples for Tracks List. */ +public final class TracksListSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/asset-tracks-list-all.json + */ + /** + * Sample code: Lists all Tracks. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listsAllTracks(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.tracks().list("contoso", "contosomedia", "ClimbingMountRainer", Context.NONE); + } +} +``` + +### Tracks_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.mediaservices.models.AssetTrack; +import com.azure.resourcemanager.mediaservices.models.TextTrack; + +/** Samples for Tracks Update. */ +public final class TracksUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/asset-tracks-update.json + */ + /** + * Sample code: Update a Track. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void updateATrack(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + AssetTrack resource = + manager + .tracks() + .getWithResponse("contoso", "contosomedia", "ClimbingMountRainer", "text1", Context.NONE) + .getValue(); + resource.update().withTrack(new TextTrack().withDisplayName("A new name")).apply(); + } +} +``` + +### Tracks_UpdateTrackData + +```java +import com.azure.core.util.Context; + +/** Samples for Tracks UpdateTrackData. */ +public final class TracksUpdateTrackDataSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/asset-tracks-update-data.json + */ + /** + * Sample code: Update the data for a tracks. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void updateTheDataForATracks(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.tracks().updateTrackData("contoso", "contosomedia", "ClimbingMountRainer", "text2", 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-11-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-11-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-11-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-11-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-11-01T00:00:00.0000000Z and properties/created le" + + " 2021-11-01T00:00:10.0000000Z", + "properties/created", + Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-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-11-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-11-01T00:00:00.0000000Z and properties/lastmodified le" + + " 2021-11-01T00:00:10.0000000Z", + "properties/lastmodified desc", + Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-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-11-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 ae273b78d9cf4..0f9b08a2bb0cd 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml @@ -13,7 +13,7 @@ jar Microsoft Azure SDK for MediaServices Management - This package contains Microsoft Azure SDK for MediaServices Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. This Swagger was generated by the API Framework. Package tag package-2021-06. + This package contains Microsoft Azure SDK for MediaServices Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. This Swagger was generated by the API Framework. Package tag package-2021-11. https://github.com/Azure/azure-sdk-for-java @@ -39,7 +39,6 @@ UTF-8 true - 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 056bd0d3a1d56..7756fe5a4eeb0 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 @@ -8,6 +8,7 @@ import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; @@ -30,13 +31,18 @@ import com.azure.resourcemanager.mediaservices.implementation.LiveEventsImpl; import com.azure.resourcemanager.mediaservices.implementation.LiveOutputsImpl; import com.azure.resourcemanager.mediaservices.implementation.LocationsImpl; +import com.azure.resourcemanager.mediaservices.implementation.MediaServiceOperationResultsImpl; +import com.azure.resourcemanager.mediaservices.implementation.MediaServiceOperationStatusesImpl; import com.azure.resourcemanager.mediaservices.implementation.MediaservicesImpl; +import com.azure.resourcemanager.mediaservices.implementation.OperationResultsImpl; +import com.azure.resourcemanager.mediaservices.implementation.OperationStatusesImpl; import com.azure.resourcemanager.mediaservices.implementation.OperationsImpl; import com.azure.resourcemanager.mediaservices.implementation.PrivateEndpointConnectionsImpl; import com.azure.resourcemanager.mediaservices.implementation.PrivateLinkResourcesImpl; import com.azure.resourcemanager.mediaservices.implementation.StreamingEndpointsImpl; import com.azure.resourcemanager.mediaservices.implementation.StreamingLocatorsImpl; import com.azure.resourcemanager.mediaservices.implementation.StreamingPoliciesImpl; +import com.azure.resourcemanager.mediaservices.implementation.TracksImpl; import com.azure.resourcemanager.mediaservices.implementation.TransformsImpl; import com.azure.resourcemanager.mediaservices.models.AccountFilters; import com.azure.resourcemanager.mediaservices.models.AssetFilters; @@ -46,22 +52,30 @@ import com.azure.resourcemanager.mediaservices.models.LiveEvents; import com.azure.resourcemanager.mediaservices.models.LiveOutputs; import com.azure.resourcemanager.mediaservices.models.Locations; +import com.azure.resourcemanager.mediaservices.models.MediaServiceOperationResults; +import com.azure.resourcemanager.mediaservices.models.MediaServiceOperationStatuses; import com.azure.resourcemanager.mediaservices.models.Mediaservices; +import com.azure.resourcemanager.mediaservices.models.OperationResults; +import com.azure.resourcemanager.mediaservices.models.OperationStatuses; import com.azure.resourcemanager.mediaservices.models.Operations; import com.azure.resourcemanager.mediaservices.models.PrivateEndpointConnections; import com.azure.resourcemanager.mediaservices.models.PrivateLinkResources; import com.azure.resourcemanager.mediaservices.models.StreamingEndpoints; import com.azure.resourcemanager.mediaservices.models.StreamingLocators; import com.azure.resourcemanager.mediaservices.models.StreamingPolicies; +import com.azure.resourcemanager.mediaservices.models.Tracks; import com.azure.resourcemanager.mediaservices.models.Transforms; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; /** Entry point to MediaServicesManager. This Swagger was generated by the API Framework. */ public final class MediaServicesManager { + private AccountFilters accountFilters; + private Operations operations; private Mediaservices mediaservices; @@ -72,12 +86,20 @@ public final class MediaServicesManager { private Locations locations; - private AccountFilters accountFilters; + private MediaServiceOperationStatuses mediaServiceOperationStatuses; + + private MediaServiceOperationResults mediaServiceOperationResults; private Assets assets; private AssetFilters assetFilters; + private Tracks tracks; + + private OperationStatuses operationStatuses; + + private OperationResults operationResults; + private ContentKeyPolicies contentKeyPolicies; private Transforms transforms; @@ -230,7 +252,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(" (") @@ -253,11 +275,24 @@ public MediaServicesManager authenticate(TokenCredential credential, AzureProfil List policies = new ArrayList<>(); policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new RequestIdPolicy()); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies.addAll(this.policies); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); HttpPipeline httpPipeline = @@ -269,6 +304,14 @@ public MediaServicesManager authenticate(TokenCredential credential, AzureProfil } } + /** @return Resource collection API of AccountFilters. */ + public AccountFilters accountFilters() { + if (this.accountFilters == null) { + this.accountFilters = new AccountFiltersImpl(clientObject.getAccountFilters(), this); + } + return accountFilters; + } + /** @return Resource collection API of Operations. */ public Operations operations() { if (this.operations == null) { @@ -310,12 +353,22 @@ public Locations locations() { return locations; } - /** @return Resource collection API of AccountFilters. */ - public AccountFilters accountFilters() { - if (this.accountFilters == null) { - this.accountFilters = new AccountFiltersImpl(clientObject.getAccountFilters(), this); + /** @return Resource collection API of MediaServiceOperationStatuses. */ + public MediaServiceOperationStatuses mediaServiceOperationStatuses() { + if (this.mediaServiceOperationStatuses == null) { + this.mediaServiceOperationStatuses = + new MediaServiceOperationStatusesImpl(clientObject.getMediaServiceOperationStatuses(), this); } - return accountFilters; + return mediaServiceOperationStatuses; + } + + /** @return Resource collection API of MediaServiceOperationResults. */ + public MediaServiceOperationResults mediaServiceOperationResults() { + if (this.mediaServiceOperationResults == null) { + this.mediaServiceOperationResults = + new MediaServiceOperationResultsImpl(clientObject.getMediaServiceOperationResults(), this); + } + return mediaServiceOperationResults; } /** @return Resource collection API of Assets. */ @@ -334,6 +387,30 @@ public AssetFilters assetFilters() { return assetFilters; } + /** @return Resource collection API of Tracks. */ + public Tracks tracks() { + if (this.tracks == null) { + this.tracks = new TracksImpl(clientObject.getTracks(), this); + } + return tracks; + } + + /** @return Resource collection API of OperationStatuses. */ + public OperationStatuses operationStatuses() { + if (this.operationStatuses == null) { + this.operationStatuses = new OperationStatusesImpl(clientObject.getOperationStatuses(), this); + } + return operationStatuses; + } + + /** @return Resource collection API of OperationResults. */ + public OperationResults operationResults() { + if (this.operationResults == null) { + this.operationResults = new OperationResultsImpl(clientObject.getOperationResults(), this); + } + return operationResults; + } + /** @return Resource collection API of ContentKeyPolicies. */ public ContentKeyPolicies contentKeyPolicies() { if (this.contentKeyPolicies == null) { diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/AccountFiltersClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/AccountFiltersClient.java index 80b82ac41944a..591ed7b404a4f 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/AccountFiltersClient.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/AccountFiltersClient.java @@ -21,7 +21,7 @@ public interface AccountFiltersClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of AccountFilter items. + * @return a collection of AccountFilter items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String accountName); @@ -35,7 +35,7 @@ public interface AccountFiltersClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of AccountFilter items. + * @return a collection of AccountFilter items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String accountName, Context context); @@ -64,7 +64,7 @@ public interface AccountFiltersClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Account Filter in the Media Services account. + * @return the details of an Account Filter in the Media Services account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -97,7 +97,7 @@ AccountFilterInner createOrUpdate( * @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 an Account Filter. + * @return an Account Filter along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( @@ -130,7 +130,7 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse(String resourceGroupName, String accountName, String filterName, Context context); @@ -162,7 +162,7 @@ AccountFilterInner update( * @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 an Account Filter. + * @return an Account Filter along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/AssetFiltersClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/AssetFiltersClient.java index 7a43d17648f09..15680d867a7cb 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/AssetFiltersClient.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/AssetFiltersClient.java @@ -22,7 +22,7 @@ public interface AssetFiltersClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of AssetFilter items. + * @return a collection of AssetFilter items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String accountName, String assetName); @@ -37,7 +37,7 @@ public interface AssetFiltersClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of AssetFilter items. + * @return a collection of AssetFilter items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -69,7 +69,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Asset Filter associated with the specified Asset. + * @return the details of an Asset Filter associated with the specified Asset along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -104,7 +104,7 @@ AssetFilterInner createOrUpdate( * @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 an Asset Filter. + * @return an Asset Filter along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( @@ -140,7 +140,7 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse( @@ -175,7 +175,7 @@ AssetFilterInner update( * @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 an Asset Filter. + * @return an Asset Filter along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/AssetsClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/AssetsClient.java index c4268b38da834..0d7aaad08e5a1 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/AssetsClient.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/AssetsClient.java @@ -25,7 +25,7 @@ public interface AssetsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of Asset items. + * @return a collection of Asset items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String accountName); @@ -43,7 +43,7 @@ public interface AssetsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of Asset items. + * @return a collection of Asset items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -73,7 +73,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Asset in the Media Services account. + * @return the details of an Asset in the Media Services account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -105,7 +105,7 @@ Response getWithResponse( * @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 an Asset. + * @return an Asset along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( @@ -134,7 +134,7 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse(String resourceGroupName, String accountName, String assetName, Context context); @@ -165,7 +165,7 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Asset. + * @return an Asset along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( @@ -200,7 +200,7 @@ AssetContainerSasInner listContainerSas( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Asset Storage container SAS URLs. + * @return the Asset Storage container SAS URLs along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listContainerSasWithResponse( @@ -235,7 +235,8 @@ StorageEncryptedAssetDecryptionDataInner getEncryptionKey( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Asset storage encryption keys used to decrypt content created by version 2 of the Media Services API. + * @return the Asset storage encryption keys used to decrypt content created by version 2 of the Media Services API + * along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getEncryptionKeyWithResponse( @@ -266,7 +267,7 @@ ListStreamingLocatorsResponseInner listStreamingLocators( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Streaming Locators associated with this Asset. + * @return the Streaming Locators associated with this Asset along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listStreamingLocatorsWithResponse( diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/AzureMediaServices.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/AzureMediaServices.java index 8992f79895d4c..85765070ad178 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/AzureMediaServices.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/AzureMediaServices.java @@ -44,6 +44,13 @@ public interface AzureMediaServices { */ Duration getDefaultPollInterval(); + /** + * Gets the AccountFiltersClient object to access its operations. + * + * @return the AccountFiltersClient object. + */ + AccountFiltersClient getAccountFilters(); + /** * Gets the OperationsClient object to access its operations. * @@ -80,11 +87,18 @@ public interface AzureMediaServices { LocationsClient getLocations(); /** - * Gets the AccountFiltersClient object to access its operations. + * Gets the MediaServiceOperationStatusesClient object to access its operations. * - * @return the AccountFiltersClient object. + * @return the MediaServiceOperationStatusesClient object. */ - AccountFiltersClient getAccountFilters(); + MediaServiceOperationStatusesClient getMediaServiceOperationStatuses(); + + /** + * Gets the MediaServiceOperationResultsClient object to access its operations. + * + * @return the MediaServiceOperationResultsClient object. + */ + MediaServiceOperationResultsClient getMediaServiceOperationResults(); /** * Gets the AssetsClient object to access its operations. @@ -100,6 +114,27 @@ public interface AzureMediaServices { */ AssetFiltersClient getAssetFilters(); + /** + * Gets the TracksClient object to access its operations. + * + * @return the TracksClient object. + */ + TracksClient getTracks(); + + /** + * Gets the OperationStatusesClient object to access its operations. + * + * @return the OperationStatusesClient object. + */ + OperationStatusesClient getOperationStatuses(); + + /** + * Gets the OperationResultsClient object to access its operations. + * + * @return the OperationResultsClient object. + */ + OperationResultsClient getOperationResults(); + /** * Gets the ContentKeyPoliciesClient object to access its operations. * diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/ContentKeyPoliciesClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/ContentKeyPoliciesClient.java index 5117e4a1ea84e..890713f7ffede 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/ContentKeyPoliciesClient.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/ContentKeyPoliciesClient.java @@ -22,7 +22,7 @@ public interface ContentKeyPoliciesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of ContentKeyPolicy items. + * @return a collection of ContentKeyPolicy items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String accountName); @@ -40,7 +40,7 @@ public interface ContentKeyPoliciesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of ContentKeyPolicy items. + * @return a collection of ContentKeyPolicy items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -70,7 +70,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Content Key Policy in the Media Services account. + * @return the details of a Content Key Policy in the Media Services account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -103,7 +103,7 @@ ContentKeyPolicyInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Content Key Policy resource. + * @return a Content Key Policy resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( @@ -136,7 +136,7 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse( @@ -169,7 +169,7 @@ ContentKeyPolicyInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Content Key Policy resource. + * @return a Content Key Policy resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( @@ -204,7 +204,7 @@ ContentKeyPolicyPropertiesInner getPolicyPropertiesWithSecrets( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Content Key Policy including secret values. + * @return a Content Key Policy including secret values along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getPolicyPropertiesWithSecretsWithResponse( diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/JobsClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/JobsClient.java index df4d5e3565592..19dd448f271c7 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/JobsClient.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/JobsClient.java @@ -22,7 +22,7 @@ public interface JobsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of Job items. + * @return a collection of Job items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String accountName, String transformName); @@ -39,7 +39,7 @@ public interface JobsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of Job items. + * @return a collection of Job items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -76,7 +76,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job. + * @return a Job along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -111,7 +111,7 @@ JobInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job resource type. + * @return a Job resource type along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createWithResponse( @@ -147,7 +147,7 @@ Response createWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse( @@ -184,7 +184,7 @@ JobInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job resource type. + * @return a Job resource type along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( @@ -220,7 +220,7 @@ Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response cancelJobWithResponse( 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 a08ead220ef70..d2b91b5fcc51a 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 as paginated response with {@link PagedIterable}. */ @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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String accountName, Context context); @@ -67,7 +67,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 properties of a live event. + * @return properties of a live event along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -84,9 +84,9 @@ Response getWithResponse( * @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 live event. + * @return the {@link SyncPoller} for polling of the live event. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LiveEventInner> beginCreate( String resourceGroupName, String accountName, @@ -106,9 +106,9 @@ SyncPoller, LiveEventInner> beginCreate( * @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 live event. + * @return the {@link SyncPoller} for polling of the live event. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LiveEventInner> beginCreate( String resourceGroupName, String accountName, @@ -187,9 +187,9 @@ LiveEventInner create( * @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 live event. + * @return the {@link SyncPoller} for polling of the live event. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LiveEventInner> beginUpdate( String resourceGroupName, String accountName, String liveEventName, LiveEventInner parameters); @@ -204,9 +204,9 @@ SyncPoller, LiveEventInner> beginUpdate( * @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 live event. + * @return the {@link SyncPoller} for polling of 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); @@ -252,9 +252,9 @@ LiveEventInner update( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String liveEventName); /** @@ -267,9 +267,9 @@ LiveEventInner update( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, String liveEventName, Context context); @@ -309,9 +309,9 @@ SyncPoller, Void> beginDelete( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginAllocate( String resourceGroupName, String accountName, String liveEventName); @@ -325,9 +325,9 @@ SyncPoller, Void> beginAllocate( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginAllocate( String resourceGroupName, String accountName, String liveEventName, Context context); @@ -367,9 +367,9 @@ SyncPoller, Void> beginAllocate( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStart(String resourceGroupName, String accountName, String liveEventName); /** @@ -382,9 +382,9 @@ SyncPoller, Void> beginAllocate( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStart( String resourceGroupName, String accountName, String liveEventName, Context context); @@ -425,9 +425,9 @@ SyncPoller, Void> beginStart( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStop( String resourceGroupName, String accountName, String liveEventName, LiveEventActionInput parameters); @@ -442,9 +442,9 @@ SyncPoller, Void> beginStop( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStop( String resourceGroupName, String accountName, @@ -497,9 +497,9 @@ void stop( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginReset(String resourceGroupName, String accountName, String liveEventName); /** @@ -514,9 +514,9 @@ void stop( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @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 f02c8906e67ae..9866a05b01ae3 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 as paginated response with {@link PagedIterable}. */ @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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -71,7 +71,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a live output. + * @return a live output along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -88,9 +88,9 @@ Response getWithResponse( * @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 Live Output. + * @return the {@link SyncPoller} for polling of the Live Output. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LiveOutputInner> beginCreate( String resourceGroupName, String accountName, @@ -110,9 +110,9 @@ SyncPoller, LiveOutputInner> beginCreate( * @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 Live Output. + * @return the {@link SyncPoller} for polling of the Live Output. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LiveOutputInner> beginCreate( String resourceGroupName, String accountName, @@ -175,9 +175,9 @@ LiveOutputInner create( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, String liveEventName, String liveOutputName); @@ -192,9 +192,9 @@ SyncPoller, Void> beginDelete( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @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/LocationsClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/LocationsClient.java index 23ea1df6b578c..d8f330a914d3b 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/LocationsClient.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/LocationsClient.java @@ -16,7 +16,7 @@ public interface LocationsClient { /** * Checks whether the Media Service resource name is available. * - * @param locationName The name of the location. + * @param locationName Location name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -30,13 +30,13 @@ EntityNameAvailabilityCheckOutputInner checkNameAvailability( /** * Checks whether the Media Service resource name is available. * - * @param locationName The name of the location. + * @param locationName Location name. * @param parameters The request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from the check name availability request. + * @return the response from the check name availability request along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response checkNameAvailabilityWithResponse( diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/MediaServiceOperationResultsClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/MediaServiceOperationResultsClient.java new file mode 100644 index 0000000000000..80b5a6f88726d --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/MediaServiceOperationResultsClient.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceInner; +import com.azure.resourcemanager.mediaservices.models.MediaServiceOperationResultsGetResponse; + +/** An instance of this class provides access to all the operations defined in MediaServiceOperationResultsClient. */ +public interface MediaServiceOperationResultsClient { + /** + * Get media service operation result. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return media service operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MediaServiceInner get(String locationName, String operationId); + + /** + * Get media service operation result. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return media service operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MediaServiceOperationResultsGetResponse getWithResponse(String locationName, String operationId, Context context); +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/MediaServiceOperationStatusesClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/MediaServiceOperationStatusesClient.java new file mode 100644 index 0000000000000..1c32aa4be2346 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/MediaServiceOperationStatusesClient.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceOperationStatusInner; + +/** An instance of this class provides access to all the operations defined in MediaServiceOperationStatusesClient. */ +public interface MediaServiceOperationStatusesClient { + /** + * Get media service operation status. + * + * @param locationName Location name. + * @param operationId Operation ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return media service operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MediaServiceOperationStatusInner get(String locationName, String operationId); + + /** + * Get media service operation status. + * + * @param locationName Location name. + * @param operationId Operation ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return media service operation status along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String locationName, String operationId, Context context); +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/MediaservicesClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/MediaservicesClient.java index 0d3c2c3e64f33..5a8dc5945db06 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/MediaservicesClient.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/MediaservicesClient.java @@ -8,7 +8,9 @@ import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.mediaservices.fluent.models.EdgePoliciesInner; import com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceInner; import com.azure.resourcemanager.mediaservices.models.ListEdgePoliciesInput; @@ -24,7 +26,7 @@ public interface MediaservicesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of MediaService items. + * @return a collection of MediaService items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -37,7 +39,7 @@ public interface MediaservicesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of MediaService items. + * @return a collection of MediaService items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -64,12 +66,43 @@ public interface MediaservicesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Media Services account. + * @return the details of a Media Services account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse( String resourceGroupName, String accountName, Context context); + /** + * Creates or updates a Media Services account. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a Media Services account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MediaServiceInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, MediaServiceInner parameters); + + /** + * Creates or updates a Media Services account. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a Media Services account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MediaServiceInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, MediaServiceInner parameters, Context context); + /** * Creates or updates a Media Services account. * @@ -97,7 +130,7 @@ Response getByResourceGroupWithResponse( * @return a Media Services account. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( + MediaServiceInner createOrUpdate( String resourceGroupName, String accountName, MediaServiceInner parameters, Context context); /** @@ -121,11 +154,42 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse(String resourceGroupName, String accountName, Context context); + /** + * Updates an existing Media Services account. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a Media Services account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MediaServiceInner> beginUpdate( + String resourceGroupName, String accountName, MediaServiceUpdate parameters); + + /** + * Updates an existing Media Services account. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a Media Services account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MediaServiceInner> beginUpdate( + String resourceGroupName, String accountName, MediaServiceUpdate parameters, Context context); + /** * Updates an existing Media Services account. * @@ -153,7 +217,7 @@ Response createOrUpdateWithResponse( * @return a Media Services account. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( + MediaServiceInner update( String resourceGroupName, String accountName, MediaServiceUpdate parameters, Context context); /** @@ -179,14 +243,14 @@ Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response syncStorageKeysWithResponse( String resourceGroupName, String accountName, SyncStorageKeysInput parameters, Context context); /** - * List the media edge policies associated with the Media Services account. + * List all the media edge policies associated with the Media Services account. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -200,7 +264,7 @@ Response syncStorageKeysWithResponse( EdgePoliciesInner listEdgePolicies(String resourceGroupName, String accountName, ListEdgePoliciesInput parameters); /** - * List the media edge policies associated with the Media Services account. + * List all the media edge policies associated with the Media Services account. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -209,7 +273,7 @@ Response syncStorageKeysWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listEdgePoliciesWithResponse( @@ -220,7 +284,7 @@ Response listEdgePoliciesWithResponse( * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of MediaService items. + * @return a collection of MediaService items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -232,7 +296,7 @@ Response listEdgePoliciesWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of MediaService items. + * @return a collection of MediaService items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/OperationResultsClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/OperationResultsClient.java new file mode 100644 index 0000000000000..8d23cbbee49f2 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/OperationResultsClient.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mediaservices.fluent.models.AssetTrackInner; +import com.azure.resourcemanager.mediaservices.models.OperationResultsGetResponse; + +/** An instance of this class provides access to all the operations defined in OperationResultsClient. */ +public interface OperationResultsClient { + /** + * Get asset track operation result. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return asset track operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AssetTrackInner get( + String resourceGroupName, String accountName, String assetName, String trackName, String operationId); + + /** + * Get asset track operation result. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return asset track operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationResultsGetResponse getWithResponse( + String resourceGroupName, + String accountName, + String assetName, + String trackName, + String operationId, + Context context); +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/OperationStatusesClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/OperationStatusesClient.java new file mode 100644 index 0000000000000..eb0632e139177 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/OperationStatusesClient.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mediaservices.fluent.models.AssetTrackOperationStatusInner; + +/** An instance of this class provides access to all the operations defined in OperationStatusesClient. */ +public interface OperationStatusesClient { + /** + * Get asset track operation status. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return asset track operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AssetTrackOperationStatusInner get( + String resourceGroupName, String accountName, String assetName, String trackName, String operationId); + + /** + * Get asset track operation status. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return asset track operation status along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, + String accountName, + String assetName, + String trackName, + String operationId, + Context context); +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/OperationsClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/OperationsClient.java index d6b4ee0aff031..d6b96940e4751 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/OperationsClient.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/OperationsClient.java @@ -29,7 +29,7 @@ public interface OperationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of Operation items. + * @return a collection of Operation items along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listWithResponse(Context context); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/PrivateEndpointConnectionsClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/PrivateEndpointConnectionsClient.java index eeb7bb125efa6..4b15ea4d71918 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/PrivateEndpointConnectionsClient.java @@ -14,20 +14,20 @@ /** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ public interface PrivateEndpointConnectionsClient { /** - * Get all private endpoint connections. + * List all private endpoint connections. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections. + * @return list of private endpoint connection associated with the specified storage account. */ @ServiceMethod(returns = ReturnType.SINGLE) PrivateEndpointConnectionListResultInner list(String resourceGroupName, String accountName); /** - * Get all private endpoint connections. + * List all private endpoint connections. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -35,14 +35,15 @@ public interface PrivateEndpointConnectionsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections. + * @return list of private endpoint connection associated with the specified storage account along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listWithResponse( String resourceGroupName, String accountName, Context context); /** - * Get private endpoint connection. + * Get the details of a private endpoint connection. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -50,13 +51,13 @@ Response listWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection. + * @return the details of a private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) PrivateEndpointConnectionInner get(String resourceGroupName, String accountName, String name); /** - * Get private endpoint connection. + * Get the details of a private endpoint connection. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -65,14 +66,14 @@ Response listWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection. + * @return the details of a private endpoint connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( String resourceGroupName, String accountName, String name, Context context); /** - * Update private endpoint connection. + * Update an existing private endpoint connection. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -88,7 +89,7 @@ PrivateEndpointConnectionInner createOrUpdate( String resourceGroupName, String accountName, String name, PrivateEndpointConnectionInner parameters); /** - * Update private endpoint connection. + * Update an existing private endpoint connection. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -98,7 +99,7 @@ PrivateEndpointConnectionInner createOrUpdate( * @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 Private Endpoint Connection resource. + * @return the Private Endpoint Connection resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( @@ -109,7 +110,7 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete private endpoint connection. + * Deletes a private endpoint connection. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -122,7 +123,7 @@ Response createOrUpdateWithResponse( void delete(String resourceGroupName, String accountName, String name); /** - * Delete private endpoint connection. + * Deletes a private endpoint connection. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -131,7 +132,7 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse(String resourceGroupName, String accountName, String name, Context context); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/PrivateLinkResourcesClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/PrivateLinkResourcesClient.java index 641edfa4ff757..49947daadede8 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/PrivateLinkResourcesClient.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/PrivateLinkResourcesClient.java @@ -14,20 +14,20 @@ /** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ public interface PrivateLinkResourcesClient { /** - * Get list of group IDs. + * List supported group IDs. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of group IDs. + * @return a list of private link resources. */ @ServiceMethod(returns = ReturnType.SINGLE) PrivateLinkResourceListResultInner list(String resourceGroupName, String accountName); /** - * Get list of group IDs. + * List supported group IDs. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -35,14 +35,14 @@ public interface PrivateLinkResourcesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of group IDs. + * @return a list of private link resources along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listWithResponse( String resourceGroupName, String accountName, Context context); /** - * Get group ID. + * Get details of a group ID. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -50,13 +50,13 @@ Response listWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return group ID. + * @return details of a group ID. */ @ServiceMethod(returns = ReturnType.SINGLE) PrivateLinkResourceInner get(String resourceGroupName, String accountName, String name); /** - * Get group ID. + * Get details of a group ID. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -65,7 +65,7 @@ Response listWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return group ID. + * @return details of a group ID along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/StreamingEndpointsClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/StreamingEndpointsClient.java index 26cb0f6ae3d23..44a417e478c12 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 @@ -12,6 +12,7 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.mediaservices.fluent.models.StreamingEndpointInner; +import com.azure.resourcemanager.mediaservices.fluent.models.StreamingEndpointSkuInfoListResultInner; import com.azure.resourcemanager.mediaservices.models.StreamingEntityScaleUnit; /** An instance of this class provides access to all the operations defined in StreamingEndpointsClient. */ @@ -24,7 +25,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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String accountName); @@ -38,7 +39,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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String accountName, Context context); @@ -67,7 +68,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 a streaming endpoint. + * @return a streaming endpoint along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -84,9 +85,9 @@ Response getWithResponse( * @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. + * @return the {@link SyncPoller} for polling of the streaming endpoint. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, StreamingEndpointInner> beginCreate( String resourceGroupName, String accountName, @@ -106,9 +107,9 @@ SyncPoller, StreamingEndpointInner> beginCrea * @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. + * @return the {@link SyncPoller} for polling of the streaming endpoint. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, StreamingEndpointInner> beginCreate( String resourceGroupName, String accountName, @@ -187,9 +188,9 @@ StreamingEndpointInner create( * @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. + * @return the {@link SyncPoller} for polling of the streaming endpoint. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, StreamingEndpointInner> beginUpdate( String resourceGroupName, String accountName, String streamingEndpointName, StreamingEndpointInner parameters); @@ -204,9 +205,9 @@ SyncPoller, StreamingEndpointInner> beginUpda * @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. + * @return the {@link SyncPoller} for polling of the streaming endpoint. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, StreamingEndpointInner> beginUpdate( String resourceGroupName, String accountName, @@ -260,9 +261,9 @@ StreamingEndpointInner update( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, String streamingEndpointName); @@ -276,9 +277,9 @@ SyncPoller, Void> beginDelete( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, String streamingEndpointName, Context context); @@ -310,17 +311,48 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String accountName, String streamingEndpointName, Context context); /** - * Starts an existing streaming endpoint. + * List streaming endpoint supported skus. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingEndpointName The name of the streaming endpoint, maximum length is 24. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StreamingEndpointSkuInfoListResultInner skus( + String resourceGroupName, String accountName, String streamingEndpointName); + + /** + * List streaming endpoint supported skus. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. * @param streamingEndpointName The name of the streaming endpoint, maximum length is 24. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) + Response skusWithResponse( + String resourceGroupName, String accountName, String streamingEndpointName, Context context); + + /** + * Starts an existing streaming endpoint. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingEndpointName The name of the streaming endpoint, maximum length is 24. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStart( String resourceGroupName, String accountName, String streamingEndpointName); @@ -334,9 +366,9 @@ SyncPoller, Void> beginStart( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStart( String resourceGroupName, String accountName, String streamingEndpointName, Context context); @@ -376,9 +408,9 @@ SyncPoller, Void> beginStart( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStop( String resourceGroupName, String accountName, String streamingEndpointName); @@ -392,9 +424,9 @@ SyncPoller, Void> beginStop( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStop( String resourceGroupName, String accountName, String streamingEndpointName, Context context); @@ -435,9 +467,9 @@ SyncPoller, Void> beginStop( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginScale( String resourceGroupName, String accountName, @@ -455,9 +487,9 @@ SyncPoller, Void> beginScale( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @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/StreamingLocatorsClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/StreamingLocatorsClient.java index 0cd5d1f5503f9..51a0e89ea3ff8 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/StreamingLocatorsClient.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/StreamingLocatorsClient.java @@ -23,7 +23,7 @@ public interface StreamingLocatorsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of StreamingLocator items. + * @return a collection of StreamingLocator items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String accountName); @@ -41,7 +41,7 @@ public interface StreamingLocatorsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of StreamingLocator items. + * @return a collection of StreamingLocator items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -71,7 +71,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Streaming Locator in the Media Services account. + * @return the details of a Streaming Locator in the Media Services account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -104,7 +104,7 @@ StreamingLocatorInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Streaming Locator resource. + * @return a Streaming Locator resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createWithResponse( @@ -137,7 +137,7 @@ Response createWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse( @@ -168,7 +168,7 @@ ListContentKeysResponseInner listContentKeys( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return class of response for listContentKeys action. + * @return class of response for listContentKeys action along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listContentKeysWithResponse( @@ -198,7 +198,7 @@ Response listContentKeysWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return class of response for listPaths action. + * @return class of response for listPaths action along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listPathsWithResponse( diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/StreamingPoliciesClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/StreamingPoliciesClient.java index 62cda74d43abb..d3426f6d3af7f 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/StreamingPoliciesClient.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/StreamingPoliciesClient.java @@ -21,7 +21,7 @@ public interface StreamingPoliciesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of StreamingPolicy items. + * @return a collection of StreamingPolicy items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String accountName); @@ -39,7 +39,7 @@ public interface StreamingPoliciesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of StreamingPolicy items. + * @return a collection of StreamingPolicy items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -69,7 +69,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Streaming Policy in the Media Services account. + * @return the details of a Streaming Policy in the Media Services account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -102,7 +102,7 @@ StreamingPolicyInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Streaming Policy resource. + * @return a Streaming Policy resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createWithResponse( @@ -135,7 +135,7 @@ Response createWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse( diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/TracksClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/TracksClient.java new file mode 100644 index 0000000000000..29b7a01c5806a --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/TracksClient.java @@ -0,0 +1,376 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.mediaservices.fluent.models.AssetTrackInner; + +/** An instance of this class provides access to all the operations defined in TracksClient. */ +public interface TracksClient { + /** + * Lists the Tracks in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of AssetTrack items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String accountName, String assetName); + + /** + * Lists the Tracks in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of AssetTrack items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, String accountName, String assetName, Context context); + + /** + * Get the details of a Track in the Asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of a Track in the Asset. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AssetTrackInner get(String resourceGroupName, String accountName, String assetName, String trackName); + + /** + * Get the details of a Track in the Asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of a Track in the Asset along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String accountName, String assetName, String trackName, Context context); + + /** + * Create or update a Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an Asset Track resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AssetTrackInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String assetName, String trackName, AssetTrackInner parameters); + + /** + * Create or update a Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an Asset Track resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AssetTrackInner> beginCreateOrUpdate( + String resourceGroupName, + String accountName, + String assetName, + String trackName, + AssetTrackInner parameters, + Context context); + + /** + * Create or update a Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Asset Track resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AssetTrackInner createOrUpdate( + String resourceGroupName, String accountName, String assetName, String trackName, AssetTrackInner parameters); + + /** + * Create or update a Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Asset Track resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AssetTrackInner createOrUpdate( + String resourceGroupName, + String accountName, + String assetName, + String trackName, + AssetTrackInner parameters, + Context context); + + /** + * Deletes a Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String accountName, String assetName, String trackName); + + /** + * Deletes a Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String accountName, String assetName, String trackName, Context context); + + /** + * Deletes a Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String assetName, String trackName); + + /** + * Deletes a Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String assetName, String trackName, Context context); + + /** + * Updates an existing Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an Asset Track resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AssetTrackInner> beginUpdate( + String resourceGroupName, String accountName, String assetName, String trackName, AssetTrackInner parameters); + + /** + * Updates an existing Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an Asset Track resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AssetTrackInner> beginUpdate( + String resourceGroupName, + String accountName, + String assetName, + String trackName, + AssetTrackInner parameters, + Context context); + + /** + * Updates an existing Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Asset Track resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AssetTrackInner update( + String resourceGroupName, String accountName, String assetName, String trackName, AssetTrackInner parameters); + + /** + * Updates an existing Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Asset Track resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AssetTrackInner update( + String resourceGroupName, + String accountName, + String assetName, + String trackName, + AssetTrackInner parameters, + Context context); + + /** + * Update the track data. Call this API after any changes are made to the track data stored in the asset container. + * For example, you have modified the WebVTT captions file in the Azure blob storage container for the asset, + * viewers will not see the new version of the captions unless this API is called. Note, the changes may not be + * reflected immediately. CDN cache may also need to be purged if applicable. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginUpdateTrackData( + String resourceGroupName, String accountName, String assetName, String trackName); + + /** + * Update the track data. Call this API after any changes are made to the track data stored in the asset container. + * For example, you have modified the WebVTT captions file in the Azure blob storage container for the asset, + * viewers will not see the new version of the captions unless this API is called. Note, the changes may not be + * reflected immediately. CDN cache may also need to be purged if applicable. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginUpdateTrackData( + String resourceGroupName, String accountName, String assetName, String trackName, Context context); + + /** + * Update the track data. Call this API after any changes are made to the track data stored in the asset container. + * For example, you have modified the WebVTT captions file in the Azure blob storage container for the asset, + * viewers will not see the new version of the captions unless this API is called. Note, the changes may not be + * reflected immediately. CDN cache may also need to be purged if applicable. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void updateTrackData(String resourceGroupName, String accountName, String assetName, String trackName); + + /** + * Update the track data. Call this API after any changes are made to the track data stored in the asset container. + * For example, you have modified the WebVTT captions file in the Azure blob storage container for the asset, + * viewers will not see the new version of the captions unless this API is called. Note, the changes may not be + * reflected immediately. CDN cache may also need to be purged if applicable. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void updateTrackData( + String resourceGroupName, String accountName, String assetName, String trackName, Context context); +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/TransformsClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/TransformsClient.java index 93fa7e220a7f4..28032f59d691c 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/TransformsClient.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/TransformsClient.java @@ -21,7 +21,7 @@ public interface TransformsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of Transform items. + * @return a collection of Transform items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String accountName); @@ -37,7 +37,7 @@ public interface TransformsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of Transform items. + * @return a collection of Transform items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -67,7 +67,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Transform. + * @return a Transform along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -102,7 +102,7 @@ TransformInner createOrUpdate( * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Transform encapsulates the rules or instructions for generating desired outputs from input media, such - * as by transcoding or by extracting insights. + * as by transcoding or by extracting insights along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( @@ -131,7 +131,7 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse( @@ -166,7 +166,7 @@ TransformInner update( * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Transform encapsulates the rules or instructions for generating desired outputs from input media, such - * as by transcoding or by extracting insights. + * as by transcoding or by extracting insights along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( 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 2f5568962d983..88809436fcab0 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 be566f6265db6..28844db4d5366 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 46786ef6cb8be..cdce8ffe67f4b 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 0000000000000..d64a31ae0a046 --- /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/AssetTrackInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/AssetTrackInner.java new file mode 100644 index 0000000000000..bab03c5746639 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/AssetTrackInner.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mediaservices.models.ProvisioningState; +import com.azure.resourcemanager.mediaservices.models.TrackBase; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** An Asset Track resource. */ +@Fluent +public final class AssetTrackInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AssetTrackInner.class); + + /* + * The resource properties. + */ + @JsonProperty(value = "properties") + private AssetTrackProperties innerProperties; + + /** + * Get the innerProperties property: The resource properties. + * + * @return the innerProperties value. + */ + private AssetTrackProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the track property: Detailed information about a track in the asset. + * + * @return the track value. + */ + public TrackBase track() { + return this.innerProperties() == null ? null : this.innerProperties().track(); + } + + /** + * Set the track property: Detailed information about a track in the asset. + * + * @param track the track value to set. + * @return the AssetTrackInner object itself. + */ + public AssetTrackInner withTrack(TrackBase track) { + if (this.innerProperties() == null) { + this.innerProperties = new AssetTrackProperties(); + } + this.innerProperties().withTrack(track); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the asset track. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @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/AssetTrackOperationStatusInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/AssetTrackOperationStatusInner.java new file mode 100644 index 0000000000000..55498b17cbe09 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/AssetTrackOperationStatusInner.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Status of asset track operation. */ +@Fluent +public final class AssetTrackOperationStatusInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AssetTrackOperationStatusInner.class); + + /* + * Operation identifier. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * Operation resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Operation start time. + */ + @JsonProperty(value = "startTime") + private OffsetDateTime startTime; + + /* + * Operation end time. + */ + @JsonProperty(value = "endTime") + private OffsetDateTime endTime; + + /* + * Operation status. + */ + @JsonProperty(value = "status", required = true) + private String status; + + /* + * The error detail. + */ + @JsonProperty(value = "error") + private ManagementError error; + + /** + * Get the name property: Operation identifier. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Operation identifier. + * + * @param name the name value to set. + * @return the AssetTrackOperationStatusInner object itself. + */ + public AssetTrackOperationStatusInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the id property: Operation resource ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Operation resource ID. + * + * @param id the id value to set. + * @return the AssetTrackOperationStatusInner object itself. + */ + public AssetTrackOperationStatusInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the startTime property: Operation start time. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Set the startTime property: Operation start time. + * + * @param startTime the startTime value to set. + * @return the AssetTrackOperationStatusInner object itself. + */ + public AssetTrackOperationStatusInner withStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime property: Operation end time. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Set the endTime property: Operation end time. + * + * @param endTime the endTime value to set. + * @return the AssetTrackOperationStatusInner object itself. + */ + public AssetTrackOperationStatusInner withEndTime(OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Set the status property: Operation status. + * + * @param status the status value to set. + * @return the AssetTrackOperationStatusInner object itself. + */ + public AssetTrackOperationStatusInner withStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the error property: The error detail. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Set the error property: The error detail. + * + * @param error the error value to set. + * @return the AssetTrackOperationStatusInner object itself. + */ + public AssetTrackOperationStatusInner withError(ManagementError error) { + this.error = error; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property name in model AssetTrackOperationStatusInner")); + } + if (status() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property status in model AssetTrackOperationStatusInner")); + } + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/AssetTrackProperties.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/AssetTrackProperties.java new file mode 100644 index 0000000000000..7314d719e51a0 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/AssetTrackProperties.java @@ -0,0 +1,70 @@ +// 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.ProvisioningState; +import com.azure.resourcemanager.mediaservices.models.TrackBase; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of a video, audio or text track in the asset. */ +@Fluent +public final class AssetTrackProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AssetTrackProperties.class); + + /* + * Detailed information about a track in the asset. + */ + @JsonProperty(value = "track") + private TrackBase track; + + /* + * Provisioning state of the asset track. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Get the track property: Detailed information about a track in the asset. + * + * @return the track value. + */ + public TrackBase track() { + return this.track; + } + + /** + * Set the track property: Detailed information about a track in the asset. + * + * @param track the track value to set. + * @return the AssetTrackProperties object itself. + */ + public AssetTrackProperties withTrack(TrackBase track) { + this.track = track; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the asset track. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (track() != null) { + track().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 84ce6a6cc66fc..341a27cd3c3df 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 b048a694c7e49..74a73240b9fec 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 0000000000000..9f7274a45df83 --- /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 e3bc48222309f..b748d8f416fb6 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 0000000000000..0c6856d3d88a2 --- /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 6d9be1687e7da..c0090e32b3ddd 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 0000000000000..c2ec09ca357a6 --- /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 0000000000000..7533aad64c206 --- /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 b5d2c57d143b6..cb659c1dd00b5 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,13 +5,13 @@ 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; import com.azure.resourcemanager.mediaservices.models.AccountEncryption; import com.azure.resourcemanager.mediaservices.models.KeyDelivery; import com.azure.resourcemanager.mediaservices.models.MediaServiceIdentity; +import com.azure.resourcemanager.mediaservices.models.ProvisioningState; import com.azure.resourcemanager.mediaservices.models.PublicNetworkAccess; import com.azure.resourcemanager.mediaservices.models.StorageAccount; import com.azure.resourcemanager.mediaservices.models.StorageAuthentication; @@ -22,16 +22,15 @@ 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 Managed Identity for the Media Services account. + * The resource properties. */ - @JsonProperty(value = "identity") - private MediaServiceIdentity identity; + @JsonProperty(value = "properties") + private MediaServiceProperties innerProperties; /* * The system metadata relating to this resource. @@ -40,41 +39,28 @@ public class MediaServiceInner extends Resource { 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. + * The Managed Identity for the Media Services account. */ - @JsonProperty(value = "properties.encryption") - private AccountEncryption encryption; + @JsonProperty(value = "identity") + private MediaServiceIdentity identity; - /* - * The Key Delivery properties for Media Services account. + /** + * Get the innerProperties property: The resource properties. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.keyDelivery") - private KeyDelivery keyDelivery; + private MediaServiceProperties innerProperties() { + return this.innerProperties; + } - /* - * Whether or not public network access is allowed for resources under the - * Media Services account. + /** + * Get the systemData property: The system metadata relating to this resource. + * + * @return the systemData value. */ - @JsonProperty(value = "properties.publicNetworkAccess") - private PublicNetworkAccess publicNetworkAccess; + public SystemData systemData() { + return this.systemData; + } /** * Get the identity property: The Managed Identity for the Media Services account. @@ -96,13 +82,18 @@ public MediaServiceInner withIdentity(MediaServiceIdentity identity) { return this; } - /** - * Get the systemData property: The system metadata relating to this resource. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; + /** {@inheritDoc} */ + @Override + public MediaServiceInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public MediaServiceInner withTags(Map tags) { + super.withTags(tags); + return this; } /** @@ -111,7 +102,7 @@ public SystemData systemData() { * @return the mediaServiceId value. */ public UUID mediaServiceId() { - return this.mediaServiceId; + return this.innerProperties() == null ? null : this.innerProperties().mediaServiceId(); } /** @@ -120,7 +111,7 @@ public UUID mediaServiceId() { * @return the storageAccounts value. */ public List storageAccounts() { - return this.storageAccounts; + return this.innerProperties() == null ? null : this.innerProperties().storageAccounts(); } /** @@ -130,7 +121,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 +134,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 +144,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 +157,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 +167,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 +180,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 +190,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 +204,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,22 +215,30 @@ public PublicNetworkAccess publicNetworkAccess() { * @return the MediaServiceInner object itself. */ public MediaServiceInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; + if (this.innerProperties() == null) { + this.innerProperties = new MediaServiceProperties(); + } + this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); return this; } - /** {@inheritDoc} */ - @Override - public MediaServiceInner withLocation(String location) { - super.withLocation(location); - return this; + /** + * Get the provisioningState property: Provisioning state of the Media Services account. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - /** {@inheritDoc} */ - @Override - public MediaServiceInner withTags(Map tags) { - super.withTags(tags); - return this; + /** + * Get the privateEndpointConnections property: The Private Endpoint Connections created for the Media Service + * account. + * + * @return the privateEndpointConnections value. + */ + public Object privateEndpointConnections() { + return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections(); } /** @@ -236,17 +247,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/MediaServiceOperationStatusInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/MediaServiceOperationStatusInner.java new file mode 100644 index 0000000000000..ef5bc9603fb7e --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/MediaServiceOperationStatusInner.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Status of media service operation. */ +@Fluent +public final class MediaServiceOperationStatusInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MediaServiceOperationStatusInner.class); + + /* + * Operation identifier. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * Operation resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Operation start time. + */ + @JsonProperty(value = "startTime") + private OffsetDateTime startTime; + + /* + * Operation end time. + */ + @JsonProperty(value = "endTime") + private OffsetDateTime endTime; + + /* + * Operation status. + */ + @JsonProperty(value = "status", required = true) + private String status; + + /* + * The error detail. + */ + @JsonProperty(value = "error") + private ManagementError error; + + /** + * Get the name property: Operation identifier. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Operation identifier. + * + * @param name the name value to set. + * @return the MediaServiceOperationStatusInner object itself. + */ + public MediaServiceOperationStatusInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the id property: Operation resource ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Operation resource ID. + * + * @param id the id value to set. + * @return the MediaServiceOperationStatusInner object itself. + */ + public MediaServiceOperationStatusInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the startTime property: Operation start time. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Set the startTime property: Operation start time. + * + * @param startTime the startTime value to set. + * @return the MediaServiceOperationStatusInner object itself. + */ + public MediaServiceOperationStatusInner withStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime property: Operation end time. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Set the endTime property: Operation end time. + * + * @param endTime the endTime value to set. + * @return the MediaServiceOperationStatusInner object itself. + */ + public MediaServiceOperationStatusInner withEndTime(OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Set the status property: Operation status. + * + * @param status the status value to set. + * @return the MediaServiceOperationStatusInner object itself. + */ + public MediaServiceOperationStatusInner withStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the error property: The error detail. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Set the error property: The error detail. + * + * @param error the error value to set. + * @return the MediaServiceOperationStatusInner object itself. + */ + public MediaServiceOperationStatusInner withError(ManagementError error) { + this.error = error; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property name in model MediaServiceOperationStatusInner")); + } + if (status() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property status in model MediaServiceOperationStatusInner")); + } + } +} 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 0000000000000..f89e1848f8a9d --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/MediaServiceProperties.java @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.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.ProvisioningState; +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; + + /* + * Provisioning state of the Media Services account. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * The Private Endpoint Connections created for the Media Service account. + */ + @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) + private Object privateEndpointConnections; + + /** + * Get the mediaServiceId property: The Media Services account ID. + * + * @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; + } + + /** + * Get the provisioningState property: Provisioning state of the Media Services account. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the privateEndpointConnections property: The Private Endpoint Connections created for the Media Service + * account. + * + * @return the privateEndpointConnections value. + */ + public Object privateEndpointConnections() { + return this.privateEndpointConnections; + } + + /** + * Validates the instance. + * + * @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 68ba355b5d537..33940041a9626 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 0000000000000..c8e5241f39609 --- /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 b4eb20d28ea32..0b0621273aa44 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 0000000000000..7a6259bb3108e --- /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 09d3a01297156..432bf0c40eca1 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,10 +5,10 @@ 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; +import com.azure.resourcemanager.mediaservices.models.ArmStreamingEndpointCurrentSku; import com.azure.resourcemanager.mediaservices.models.CrossSiteAccessPolicies; import com.azure.resourcemanager.mediaservices.models.StreamingEndpointAccessControl; import com.azure.resourcemanager.mediaservices.models.StreamingEndpointResourceState; @@ -19,112 +19,36 @@ 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. + * The streaming endpoint properties. */ - @JsonProperty(value = "properties.cdnEnabled") - private Boolean cdnEnabled; + @JsonProperty(value = "properties") + private StreamingEndpointProperties innerProperties; /* - * The CDN provider name. - */ - @JsonProperty(value = "properties.cdnProvider") - private String cdnProvider; - - /* - * The CDN profile name. - */ - @JsonProperty(value = "properties.cdnProfile") - private String cdnProfile; - - /* - * 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. + * The system metadata relating to this resource. */ - @JsonProperty(value = "properties.freeTrialEndTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime freeTrialEndTime; + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; /* - * The exact time the streaming endpoint was created. + * The streaming endpoint sku. */ - @JsonProperty(value = "properties.created", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime created; + @JsonProperty(value = "sku") + private ArmStreamingEndpointCurrentSku sku; - /* - * 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 +59,47 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the sku property: The streaming endpoint sku. + * + * @return the sku value. + */ + public ArmStreamingEndpointCurrentSku sku() { + return this.sku; + } + + /** + * Set the sku property: The streaming endpoint sku. + * + * @param sku the sku value to set. + * @return the StreamingEndpointInner object itself. + */ + public StreamingEndpointInner withSku(ArmStreamingEndpointCurrentSku sku) { + this.sku = sku; + return this; + } + + /** {@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 +109,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 +122,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 +132,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 +145,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 +155,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 +168,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 +178,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 +191,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 +201,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 +214,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 +224,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 +237,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 +246,7 @@ public String hostname() { * @return the cdnEnabled value. */ public Boolean cdnEnabled() { - return this.cdnEnabled; + return this.innerProperties() == null ? null : this.innerProperties().cdnEnabled(); } /** @@ -280,7 +256,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 +269,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 +279,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 +292,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 +302,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 +315,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 +324,7 @@ public String provisioningState() { * @return the resourceState value. */ public StreamingEndpointResourceState resourceState() { - return this.resourceState; + return this.innerProperties() == null ? null : this.innerProperties().resourceState(); } /** @@ -348,7 +333,7 @@ public StreamingEndpointResourceState resourceState() { * @return the crossSiteAccessPolicies value. */ public CrossSiteAccessPolicies crossSiteAccessPolicies() { - return this.crossSiteAccessPolicies; + return this.innerProperties() == null ? null : this.innerProperties().crossSiteAccessPolicies(); } /** @@ -358,7 +343,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 +356,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 +365,7 @@ public OffsetDateTime freeTrialEndTime() { * @return the created value. */ public OffsetDateTime created() { - return this.created; + return this.innerProperties() == null ? null : this.innerProperties().created(); } /** @@ -386,21 +374,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 +383,11 @@ public StreamingEndpointInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (accessControl() != null) { - accessControl().validate(); + if (innerProperties() != null) { + innerProperties().validate(); } - if (crossSiteAccessPolicies() != null) { - crossSiteAccessPolicies().validate(); + if (sku() != null) { + sku().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 0000000000000..8bb1c90e4f190 --- /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/StreamingEndpointSkuInfoListResultInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/StreamingEndpointSkuInfoListResultInner.java new file mode 100644 index 0000000000000..16c85dc106b1b --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/StreamingEndpointSkuInfoListResultInner.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mediaservices.models.ArmStreamingEndpointSkuInfo; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The StreamingEndpointSkuInfoListResult model. */ +@Fluent +public final class StreamingEndpointSkuInfoListResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StreamingEndpointSkuInfoListResultInner.class); + + /* + * The result of the List StreamingEndpoint skus. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value property: The result of the List StreamingEndpoint skus. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The result of the List StreamingEndpoint skus. + * + * @param value the value value to set. + * @return the StreamingEndpointSkuInfoListResultInner object itself. + */ + public StreamingEndpointSkuInfoListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/StreamingLocatorInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/StreamingLocatorInner.java index 683a4fb4c226a..7f10434080ca2 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 0000000000000..8bb98a9947835 --- /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 71e99a50eaa93..e5632903bae53 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 0000000000000..a3e747f7f111b --- /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 bcbc457b633fe..43b491291c20f 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 0000000000000..15247fa05e297 --- /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/AccountFiltersClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AccountFiltersClientImpl.java index 76d824182bc56..1eab05b28d4c7 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AccountFiltersClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AccountFiltersClientImpl.java @@ -163,7 +163,8 @@ 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 a collection of AccountFilter items. + * @return a collection of AccountFilter items along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String accountName) { @@ -220,7 +221,8 @@ private Mono> listSinglePageAsync(String resou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of AccountFilter items. + * @return a collection of AccountFilter items along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -274,7 +276,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 a collection of AccountFilter items. + * @return a collection of AccountFilter items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String accountName) { @@ -291,7 +293,7 @@ private PagedFlux listAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of AccountFilter items. + * @return a collection of AccountFilter items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String accountName, Context context) { @@ -308,7 +310,7 @@ private PagedFlux listAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of AccountFilter items. + * @return a collection of AccountFilter items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String accountName) { @@ -324,7 +326,7 @@ public PagedIterable list(String resourceGroupName, String a * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of AccountFilter items. + * @return a collection of AccountFilter items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String accountName, Context context) { @@ -340,7 +342,8 @@ public PagedIterable list(String resourceGroupName, String a * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Account Filter in the Media Services account. + * @return the details of an Account Filter in the Media Services account along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -394,7 +397,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Account Filter in the Media Services account. + * @return the details of an Account Filter in the Media Services account along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -444,7 +448,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Account Filter in the Media Services account. + * @return the details of an Account Filter in the Media Services account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String accountName, String filterName) { @@ -485,7 +489,7 @@ public AccountFilterInner get(String resourceGroupName, String accountName, 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 details of an Account Filter in the Media Services account. + * @return the details of an Account Filter in the Media Services account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -503,7 +507,7 @@ public Response getWithResponse( * @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 an Account Filter. + * @return an Account Filter along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -564,7 +568,7 @@ private Mono> createOrUpdateWithResponseAsync( * @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 an Account Filter. + * @return an Account Filter along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -625,7 +629,7 @@ private Mono> createOrUpdateWithResponseAsync( * @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 an Account Filter. + * @return an Account Filter on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -670,7 +674,7 @@ public AccountFilterInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Account Filter. + * @return an Account Filter along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( @@ -691,7 +695,7 @@ public Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -745,7 +749,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -795,7 +799,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String accountName, String filterName) { @@ -828,7 +832,7 @@ public void delete(String resourceGroupName, String accountName, String filterNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse( @@ -846,7 +850,7 @@ public Response deleteWithResponse( * @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 an Account Filter. + * @return an Account Filter along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -907,7 +911,7 @@ private Mono> updateWithResponseAsync( * @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 an Account Filter. + * @return an Account Filter along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -968,7 +972,7 @@ private Mono> updateWithResponseAsync( * @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 an Account Filter. + * @return an Account Filter on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1013,7 +1017,7 @@ public AccountFilterInner update( * @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 an Account Filter. + * @return an Account Filter along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -1032,7 +1036,8 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of AccountFilter items. + * @return a collection of AccountFilter items along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1068,7 +1073,8 @@ private Mono> listNextSinglePageAsync(String n * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of AccountFilter items. + * @return a collection of AccountFilter items along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @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/AccountFiltersImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AccountFiltersImpl.java index 68b7909767989..d8611d810b45b 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AccountFiltersImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AccountFiltersImpl.java @@ -149,7 +149,7 @@ public void deleteById(String id) { String .format("The resource ID '%s' is not valid. Missing path segment 'accountFilters'.", id))); } - this.deleteWithResponse(resourceGroupName, accountName, filterName, Context.NONE).getValue(); + this.deleteWithResponse(resourceGroupName, accountName, filterName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetFiltersClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetFiltersClientImpl.java index dadf89fae0195..5f0fbd1ffbb6e 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetFiltersClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetFiltersClientImpl.java @@ -169,7 +169,8 @@ 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 a collection of AssetFilter items. + * @return a collection of AssetFilter items along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -232,7 +233,8 @@ 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 a collection of AssetFilter items. + * @return a collection of AssetFilter items along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -291,7 +293,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 a collection of AssetFilter items. + * @return a collection of AssetFilter items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String accountName, String assetName) { @@ -310,7 +312,7 @@ private PagedFlux listAsync(String resourceGroupName, String a * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of AssetFilter items. + * @return a collection of AssetFilter items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -329,7 +331,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 a collection of AssetFilter items. + * @return a collection of AssetFilter items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String accountName, String assetName) { @@ -346,7 +348,7 @@ public PagedIterable list(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 a collection of AssetFilter items. + * @return a collection of AssetFilter items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -364,7 +366,8 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Asset Filter associated with the specified Asset. + * @return the details of an Asset Filter associated with the specified Asset along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -423,7 +426,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Asset Filter associated with the specified Asset. + * @return the details of an Asset Filter associated with the specified Asset along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -478,7 +482,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Asset Filter associated with the specified Asset. + * @return the details of an Asset Filter associated with the specified Asset on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -522,7 +527,7 @@ public AssetFilterInner get(String resourceGroupName, String accountName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Asset Filter associated with the specified Asset. + * @return the details of an Asset Filter associated with the specified Asset along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -541,7 +546,7 @@ public Response getWithResponse( * @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 an Asset Filter. + * @return an Asset Filter along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -611,7 +616,7 @@ private Mono> createOrUpdateWithResponseAsync( * @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 an Asset Filter. + * @return an Asset Filter along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -678,7 +683,7 @@ private Mono> createOrUpdateWithResponseAsync( * @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 an Asset Filter. + * @return an Asset Filter on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -733,7 +738,7 @@ public AssetFilterInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Asset Filter. + * @return an Asset Filter along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( @@ -758,7 +763,7 @@ public Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -817,7 +822,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -872,7 +877,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String accountName, String assetName, String filterName) { @@ -907,7 +912,7 @@ public void delete(String resourceGroupName, String accountName, String assetNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse( @@ -926,7 +931,7 @@ public Response deleteWithResponse( * @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 an Asset Filter. + * @return an Asset Filter along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -996,7 +1001,7 @@ private Mono> updateWithResponseAsync( * @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 an Asset Filter. + * @return an Asset Filter along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1063,7 +1068,7 @@ private Mono> updateWithResponseAsync( * @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 an Asset Filter. + * @return an Asset Filter on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1118,7 +1123,7 @@ public AssetFilterInner update( * @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 an Asset Filter. + * @return an Asset Filter along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -1139,7 +1144,8 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of AssetFilter items. + * @return a collection of AssetFilter items along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1175,7 +1181,8 @@ private Mono> listNextSinglePageAsync(String nex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of AssetFilter items. + * @return a collection of AssetFilter items along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @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/AssetFiltersImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetFiltersImpl.java index 2ecd07eab27c1..a998b7201c600 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetFiltersImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetFiltersImpl.java @@ -169,7 +169,7 @@ public void deleteById(String id) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'assetFilters'.", id))); } - this.deleteWithResponse(resourceGroupName, accountName, assetName, filterName, Context.NONE).getValue(); + this.deleteWithResponse(resourceGroupName, accountName, assetName, filterName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetTrackImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetTrackImpl.java new file mode 100644 index 0000000000000..3ce5652428046 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetTrackImpl.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.implementation; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.mediaservices.fluent.models.AssetTrackInner; +import com.azure.resourcemanager.mediaservices.models.AssetTrack; +import com.azure.resourcemanager.mediaservices.models.ProvisioningState; +import com.azure.resourcemanager.mediaservices.models.TrackBase; + +public final class AssetTrackImpl implements AssetTrack, AssetTrack.Definition, AssetTrack.Update { + private AssetTrackInner innerObject; + + private final com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public TrackBase track() { + return this.innerModel().track(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public AssetTrackInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.mediaservices.MediaServicesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + private String assetName; + + private String trackName; + + public AssetTrackImpl withExistingAsset(String resourceGroupName, String accountName, String assetName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + this.assetName = assetName; + return this; + } + + public AssetTrack create() { + this.innerObject = + serviceManager + .serviceClient() + .getTracks() + .createOrUpdate(resourceGroupName, accountName, assetName, trackName, this.innerModel(), Context.NONE); + return this; + } + + public AssetTrack create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getTracks() + .createOrUpdate(resourceGroupName, accountName, assetName, trackName, this.innerModel(), context); + return this; + } + + AssetTrackImpl(String name, com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager) { + this.innerObject = new AssetTrackInner(); + this.serviceManager = serviceManager; + this.trackName = name; + } + + public AssetTrackImpl update() { + return this; + } + + public AssetTrack apply() { + this.innerObject = + serviceManager + .serviceClient() + .getTracks() + .update(resourceGroupName, accountName, assetName, trackName, this.innerModel(), Context.NONE); + return this; + } + + public AssetTrack apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getTracks() + .update(resourceGroupName, accountName, assetName, trackName, this.innerModel(), context); + return this; + } + + AssetTrackImpl( + AssetTrackInner innerObject, com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = Utils.getValueFromIdByName(innerObject.id(), "mediaServices"); + this.assetName = Utils.getValueFromIdByName(innerObject.id(), "assets"); + this.trackName = Utils.getValueFromIdByName(innerObject.id(), "tracks"); + } + + public AssetTrack refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getTracks() + .getWithResponse(resourceGroupName, accountName, assetName, trackName, Context.NONE) + .getValue(); + return this; + } + + public AssetTrack refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getTracks() + .getWithResponse(resourceGroupName, accountName, assetName, trackName, context) + .getValue(); + return this; + } + + public void updateTrackData() { + serviceManager.tracks().updateTrackData(resourceGroupName, accountName, assetName, trackName); + } + + public void updateTrackData(Context context) { + serviceManager.tracks().updateTrackData(resourceGroupName, accountName, assetName, trackName, context); + } + + public AssetTrackImpl withTrack(TrackBase track) { + this.innerModel().withTrack(track); + return this; + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetTrackOperationStatusImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetTrackOperationStatusImpl.java new file mode 100644 index 0000000000000..9c007dd844584 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetTrackOperationStatusImpl.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.mediaservices.fluent.models.AssetTrackOperationStatusInner; +import com.azure.resourcemanager.mediaservices.models.AssetTrackOperationStatus; +import java.time.OffsetDateTime; + +public final class AssetTrackOperationStatusImpl implements AssetTrackOperationStatus { + private AssetTrackOperationStatusInner innerObject; + + private final com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager; + + AssetTrackOperationStatusImpl( + AssetTrackOperationStatusInner innerObject, + com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String name() { + return this.innerModel().name(); + } + + public String id() { + return this.innerModel().id(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public String status() { + return this.innerModel().status(); + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public AssetTrackOperationStatusInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.mediaservices.MediaServicesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetsClientImpl.java index ea7553186a957..fa2085e7f46a4 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetsClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetsClientImpl.java @@ -223,7 +223,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 a collection of Asset items. + * @return a collection of Asset items along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -288,7 +288,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 a collection of Asset items. + * @return a collection of Asset items along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -349,7 +349,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 a collection of Asset items. + * @return a collection of Asset items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -367,7 +367,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 a collection of Asset items. + * @return a collection of Asset items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String accountName) { @@ -392,7 +392,7 @@ private PagedFlux listAsync(String resourceGroupName, String account * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of Asset items. + * @return a collection of Asset items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -410,7 +410,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 a collection of Asset items. + * @return a collection of Asset items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String accountName) { @@ -433,7 +433,7 @@ public PagedIterable list(String resourceGroupName, String accountNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of Asset items. + * @return a collection of Asset items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -450,7 +450,8 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Asset in the Media Services account. + * @return the details of an Asset in the Media Services account along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -504,7 +505,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Asset in the Media Services account. + * @return the details of an Asset in the Media Services account along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -554,7 +556,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Asset in the Media Services account. + * @return the details of an Asset in the Media Services account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String accountName, String assetName) { @@ -595,7 +597,7 @@ public AssetInner get(String resourceGroupName, String accountName, String asset * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Asset in the Media Services account. + * @return the details of an Asset in the Media Services account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -613,7 +615,7 @@ public Response getWithResponse( * @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 an Asset. + * @return an Asset along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -674,7 +676,7 @@ private Mono> createOrUpdateWithResponseAsync( * @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 an Asset. + * @return an Asset along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -731,7 +733,7 @@ private Mono> createOrUpdateWithResponseAsync( * @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 an Asset. + * @return an Asset on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -776,7 +778,7 @@ public AssetInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Asset. + * @return an Asset along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( @@ -793,7 +795,7 @@ public Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -847,7 +849,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -897,7 +899,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String accountName, String assetName) { @@ -930,7 +932,7 @@ public void delete(String resourceGroupName, String accountName, String assetNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse( @@ -948,7 +950,7 @@ public Response deleteWithResponse( * @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 an Asset. + * @return an Asset along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1009,7 +1011,7 @@ private Mono> updateWithResponseAsync( * @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 an Asset. + * @return an Asset along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1066,7 +1068,7 @@ private Mono> updateWithResponseAsync( * @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 an Asset. + * @return an Asset on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1110,7 +1112,7 @@ public AssetInner update(String resourceGroupName, String accountName, String as * @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 an Asset. + * @return an Asset along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -1129,7 +1131,8 @@ public Response updateWithResponse( * @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 Asset Storage container SAS URLs. + * @return the Asset Storage container SAS URLs along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listContainerSasWithResponseAsync( @@ -1191,7 +1194,8 @@ private Mono> listContainerSasWithResponseAsync * @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 Asset Storage container SAS URLs. + * @return the Asset Storage container SAS URLs along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listContainerSasWithResponseAsync( @@ -1253,7 +1257,7 @@ private Mono> listContainerSasWithResponseAsync * @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 Asset Storage container SAS URLs. + * @return the Asset Storage container SAS URLs on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listContainerSasAsync( @@ -1300,7 +1304,7 @@ public AssetContainerSasInner listContainerSas( * @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 Asset Storage container SAS URLs. + * @return the Asset Storage container SAS URLs along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listContainerSasWithResponse( @@ -1322,7 +1326,8 @@ public Response listContainerSasWithResponse( * @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 Asset storage encryption keys used to decrypt content created by version 2 of the Media Services API. + * @return the Asset storage encryption keys used to decrypt content created by version 2 of the Media Services API + * along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getEncryptionKeyWithResponseAsync( @@ -1376,7 +1381,8 @@ private Mono> getEncryptionKe * @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 Asset storage encryption keys used to decrypt content created by version 2 of the Media Services API. + * @return the Asset storage encryption keys used to decrypt content created by version 2 of the Media Services API + * along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getEncryptionKeyWithResponseAsync( @@ -1426,7 +1432,8 @@ private Mono> getEncryptionKe * @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 Asset storage encryption keys used to decrypt content created by version 2 of the Media Services API. + * @return the Asset storage encryption keys used to decrypt content created by version 2 of the Media Services API + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getEncryptionKeyAsync( @@ -1469,7 +1476,8 @@ public StorageEncryptedAssetDecryptionDataInner getEncryptionKey( * @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 Asset storage encryption keys used to decrypt content created by version 2 of the Media Services API. + * @return the Asset storage encryption keys used to decrypt content created by version 2 of the Media Services API + * along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getEncryptionKeyWithResponse( @@ -1486,7 +1494,8 @@ public Response getEncryptionKeyWithRe * @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 Locators associated with this Asset. + * @return the Streaming Locators associated with this Asset along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listStreamingLocatorsWithResponseAsync( @@ -1540,7 +1549,8 @@ private Mono> listStreamingLocators * @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 Locators associated with this Asset. + * @return the Streaming Locators associated with this Asset along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listStreamingLocatorsWithResponseAsync( @@ -1590,7 +1600,7 @@ private Mono> listStreamingLocators * @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 Locators associated with this Asset. + * @return the Streaming Locators associated with this Asset on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listStreamingLocatorsAsync( @@ -1633,7 +1643,7 @@ public ListStreamingLocatorsResponseInner listStreamingLocators( * @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 Locators associated with this Asset. + * @return the Streaming Locators associated with this Asset along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listStreamingLocatorsWithResponse( @@ -1648,7 +1658,7 @@ public Response listStreamingLocatorsWithRes * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of Asset items. + * @return a collection of Asset items along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1684,7 +1694,7 @@ private Mono> listNextSinglePageAsync(String nextLink) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of Asset items. + * @return a collection of Asset items along with {@link PagedResponse} on successful completion of {@link Mono}. */ @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/AssetsImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetsImpl.java index 5ef058244fbcb..1bc217ac54a25 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetsImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetsImpl.java @@ -239,7 +239,7 @@ public void deleteById(String id) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'assets'.", id))); } - this.deleteWithResponse(resourceGroupName, accountName, assetName, Context.NONE).getValue(); + this.deleteWithResponse(resourceGroupName, accountName, assetName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AzureMediaServicesImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AzureMediaServicesImpl.java index 40c851085f770..f3f97a626f84d 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AzureMediaServicesImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AzureMediaServicesImpl.java @@ -30,13 +30,18 @@ import com.azure.resourcemanager.mediaservices.fluent.LiveEventsClient; import com.azure.resourcemanager.mediaservices.fluent.LiveOutputsClient; import com.azure.resourcemanager.mediaservices.fluent.LocationsClient; +import com.azure.resourcemanager.mediaservices.fluent.MediaServiceOperationResultsClient; +import com.azure.resourcemanager.mediaservices.fluent.MediaServiceOperationStatusesClient; import com.azure.resourcemanager.mediaservices.fluent.MediaservicesClient; +import com.azure.resourcemanager.mediaservices.fluent.OperationResultsClient; +import com.azure.resourcemanager.mediaservices.fluent.OperationStatusesClient; import com.azure.resourcemanager.mediaservices.fluent.OperationsClient; import com.azure.resourcemanager.mediaservices.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.mediaservices.fluent.PrivateLinkResourcesClient; import com.azure.resourcemanager.mediaservices.fluent.StreamingEndpointsClient; import com.azure.resourcemanager.mediaservices.fluent.StreamingLocatorsClient; import com.azure.resourcemanager.mediaservices.fluent.StreamingPoliciesClient; +import com.azure.resourcemanager.mediaservices.fluent.TracksClient; import com.azure.resourcemanager.mediaservices.fluent.TransformsClient; import java.io.IOException; import java.lang.reflect.Type; @@ -125,6 +130,18 @@ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } + /** The AccountFiltersClient object to access its operations. */ + private final AccountFiltersClient accountFilters; + + /** + * Gets the AccountFiltersClient object to access its operations. + * + * @return the AccountFiltersClient object. + */ + public AccountFiltersClient getAccountFilters() { + return this.accountFilters; + } + /** The OperationsClient object to access its operations. */ private final OperationsClient operations; @@ -185,16 +202,28 @@ public LocationsClient getLocations() { return this.locations; } - /** The AccountFiltersClient object to access its operations. */ - private final AccountFiltersClient accountFilters; + /** The MediaServiceOperationStatusesClient object to access its operations. */ + private final MediaServiceOperationStatusesClient mediaServiceOperationStatuses; /** - * Gets the AccountFiltersClient object to access its operations. + * Gets the MediaServiceOperationStatusesClient object to access its operations. * - * @return the AccountFiltersClient object. + * @return the MediaServiceOperationStatusesClient object. */ - public AccountFiltersClient getAccountFilters() { - return this.accountFilters; + public MediaServiceOperationStatusesClient getMediaServiceOperationStatuses() { + return this.mediaServiceOperationStatuses; + } + + /** The MediaServiceOperationResultsClient object to access its operations. */ + private final MediaServiceOperationResultsClient mediaServiceOperationResults; + + /** + * Gets the MediaServiceOperationResultsClient object to access its operations. + * + * @return the MediaServiceOperationResultsClient object. + */ + public MediaServiceOperationResultsClient getMediaServiceOperationResults() { + return this.mediaServiceOperationResults; } /** The AssetsClient object to access its operations. */ @@ -221,6 +250,42 @@ public AssetFiltersClient getAssetFilters() { return this.assetFilters; } + /** The TracksClient object to access its operations. */ + private final TracksClient tracks; + + /** + * Gets the TracksClient object to access its operations. + * + * @return the TracksClient object. + */ + public TracksClient getTracks() { + return this.tracks; + } + + /** The OperationStatusesClient object to access its operations. */ + private final OperationStatusesClient operationStatuses; + + /** + * Gets the OperationStatusesClient object to access its operations. + * + * @return the OperationStatusesClient object. + */ + public OperationStatusesClient getOperationStatuses() { + return this.operationStatuses; + } + + /** The OperationResultsClient object to access its operations. */ + private final OperationResultsClient operationResults; + + /** + * Gets the OperationResultsClient object to access its operations. + * + * @return the OperationResultsClient object. + */ + public OperationResultsClient getOperationResults() { + return this.operationResults; + } + /** The ContentKeyPoliciesClient object to access its operations. */ private final ContentKeyPoliciesClient contentKeyPolicies; @@ -339,15 +404,20 @@ public StreamingEndpointsClient getStreamingEndpoints() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2021-06-01"; + this.apiVersion = "2021-11-01"; + this.accountFilters = new AccountFiltersClientImpl(this); this.operations = new OperationsClientImpl(this); this.mediaservices = new MediaservicesClientImpl(this); this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); this.locations = new LocationsClientImpl(this); - this.accountFilters = new AccountFiltersClientImpl(this); + this.mediaServiceOperationStatuses = new MediaServiceOperationStatusesClientImpl(this); + this.mediaServiceOperationResults = new MediaServiceOperationResultsClientImpl(this); this.assets = new AssetsClientImpl(this); this.assetFilters = new AssetFiltersClientImpl(this); + this.tracks = new TracksClientImpl(this); + this.operationStatuses = new OperationStatusesClientImpl(this); + this.operationResults = new OperationResultsClientImpl(this); this.contentKeyPolicies = new ContentKeyPoliciesClientImpl(this); this.transforms = new TransformsClientImpl(this); this.jobs = new JobsClientImpl(this); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/ContentKeyPoliciesClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/ContentKeyPoliciesClientImpl.java index 8ce5526600b4d..243af861b2c02 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/ContentKeyPoliciesClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/ContentKeyPoliciesClientImpl.java @@ -188,7 +188,8 @@ 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 a collection of ContentKeyPolicy items. + * @return a collection of ContentKeyPolicy items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -253,7 +254,8 @@ 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 a collection of ContentKeyPolicy items. + * @return a collection of ContentKeyPolicy items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -314,7 +316,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 a collection of ContentKeyPolicy items. + * @return a collection of ContentKeyPolicy items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -332,7 +334,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 a collection of ContentKeyPolicy items. + * @return a collection of ContentKeyPolicy items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String accountName) { @@ -357,7 +359,7 @@ private PagedFlux listAsync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of ContentKeyPolicy items. + * @return a collection of ContentKeyPolicy items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -375,7 +377,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 a collection of ContentKeyPolicy items. + * @return a collection of ContentKeyPolicy items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String accountName) { @@ -398,7 +400,7 @@ public PagedIterable list(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of ContentKeyPolicy items. + * @return a collection of ContentKeyPolicy items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -415,7 +417,8 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Content Key Policy in the Media Services account. + * @return the details of a Content Key Policy in the Media Services account along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -470,7 +473,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Content Key Policy in the Media Services account. + * @return the details of a Content Key Policy in the Media Services account along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -521,7 +525,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Content Key Policy in the Media Services account. + * @return the details of a Content Key Policy in the Media Services account on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -563,7 +568,7 @@ public ContentKeyPolicyInner get(String resourceGroupName, String accountName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Content Key Policy in the Media Services account. + * @return the details of a Content Key Policy in the Media Services account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -581,7 +586,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Content Key Policy resource. + * @return a Content Key Policy resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -643,7 +648,7 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Content Key Policy resource. + * @return a Content Key Policy resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -705,7 +710,7 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Content Key Policy resource. + * @return a Content Key Policy resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -750,7 +755,7 @@ public ContentKeyPolicyInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Content Key Policy resource. + * @return a Content Key Policy resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( @@ -773,7 +778,7 @@ public Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -828,7 +833,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -879,7 +884,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String accountName, String contentKeyPolicyName) { @@ -912,7 +917,7 @@ public void delete(String resourceGroupName, String accountName, String contentK * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse( @@ -930,7 +935,7 @@ public Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Content Key Policy resource. + * @return a Content Key Policy resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -992,7 +997,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Content Key Policy resource. + * @return a Content Key Policy resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1054,7 +1059,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Content Key Policy resource. + * @return a Content Key Policy resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1099,7 +1104,7 @@ public ContentKeyPolicyInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Content Key Policy resource. + * @return a Content Key Policy resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -1121,7 +1126,8 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Content Key Policy including secret values. + * @return a Content Key Policy including secret values along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getPolicyPropertiesWithSecretsWithResponseAsync( @@ -1176,7 +1182,8 @@ private Mono> getPolicyPropertiesWithS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Content Key Policy including secret values. + * @return a Content Key Policy including secret values along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getPolicyPropertiesWithSecretsWithResponseAsync( @@ -1227,7 +1234,7 @@ private Mono> getPolicyPropertiesWithS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Content Key Policy including secret values. + * @return a Content Key Policy including secret values on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getPolicyPropertiesWithSecretsAsync( @@ -1270,7 +1277,7 @@ public ContentKeyPolicyPropertiesInner getPolicyPropertiesWithSecrets( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Content Key Policy including secret values. + * @return a Content Key Policy including secret values along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getPolicyPropertiesWithSecretsWithResponse( @@ -1287,7 +1294,8 @@ public Response getPolicyPropertiesWithSecretsW * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of ContentKeyPolicy items. + * @return a collection of ContentKeyPolicy items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1323,7 +1331,8 @@ private Mono> listNextSinglePageAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of ContentKeyPolicy items. + * @return a collection of ContentKeyPolicy items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @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/ContentKeyPoliciesImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/ContentKeyPoliciesImpl.java index 73a82b1a0a593..0ab17310d3601 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/ContentKeyPoliciesImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/ContentKeyPoliciesImpl.java @@ -186,7 +186,7 @@ public void deleteById(String id) { .format( "The resource ID '%s' is not valid. Missing path segment 'contentKeyPolicies'.", id))); } - this.deleteWithResponse(resourceGroupName, accountName, contentKeyPolicyName, Context.NONE).getValue(); + this.deleteWithResponse(resourceGroupName, accountName, contentKeyPolicyName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/JobsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/JobsClientImpl.java index 83266e04e75e5..789a62d1d90df 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/JobsClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/JobsClientImpl.java @@ -190,7 +190,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 a collection of Job items. + * @return a collection of Job items along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -257,7 +257,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 a collection of Job items. + * @return a collection of Job items along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -325,7 +325,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 a collection of Job items. + * @return a collection of Job items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -344,7 +344,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 a collection of Job items. + * @return a collection of Job items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String accountName, String transformName) { @@ -367,7 +367,7 @@ private PagedFlux listAsync(String resourceGroupName, String accountNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of Job items. + * @return a collection of Job items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -391,7 +391,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 a collection of Job items. + * @return a collection of Job items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String accountName, String transformName) { @@ -412,7 +412,7 @@ public PagedIterable list(String resourceGroupName, String accountName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of Job items. + * @return a collection of Job items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -435,7 +435,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job. + * @return a Job along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -494,7 +494,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job. + * @return a Job along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -549,7 +549,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job. + * @return a Job on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -593,7 +593,7 @@ public JobInner get(String resourceGroupName, String accountName, String transfo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job. + * @return a Job along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -612,7 +612,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job resource type. + * @return a Job resource type along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createWithResponseAsync( @@ -678,7 +678,7 @@ private Mono> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job resource type. + * @return a Job resource type along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createWithResponseAsync( @@ -745,7 +745,7 @@ private Mono> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job resource type. + * @return a Job resource type on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -792,7 +792,7 @@ public JobInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job resource type. + * @return a Job resource type along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createWithResponse( @@ -816,7 +816,7 @@ public Response createWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -875,7 +875,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -930,7 +930,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String accountName, String transformName, String jobName) { @@ -965,7 +965,7 @@ public void delete(String resourceGroupName, String accountName, String transfor * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse( @@ -985,7 +985,7 @@ public Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job resource type. + * @return a Job resource type along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1052,7 +1052,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job resource type. + * @return a Job resource type along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1120,7 +1120,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job resource type. + * @return a Job resource type on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1169,7 +1169,7 @@ public JobInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job resource type. + * @return a Job resource type along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -1193,7 +1193,7 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> cancelJobWithResponseAsync( @@ -1252,7 +1252,7 @@ private Mono> cancelJobWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> cancelJobWithResponseAsync( @@ -1307,7 +1307,7 @@ private Mono> cancelJobWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono cancelJobAsync( @@ -1343,7 +1343,7 @@ public void cancelJob(String resourceGroupName, String accountName, String trans * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response cancelJobWithResponse( @@ -1358,7 +1358,7 @@ public Response cancelJobWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of Job items. + * @return a collection of Job items along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1394,7 +1394,7 @@ private Mono> listNextSinglePageAsync(String nextLink) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of Job items. + * @return a collection of Job items along with {@link PagedResponse} on successful completion of {@link Mono}. */ @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/JobsImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/JobsImpl.java index cdf45eebc40be..79f793af8e8ae 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/JobsImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/JobsImpl.java @@ -185,7 +185,7 @@ public void deleteById(String id) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); } - this.deleteWithResponse(resourceGroupName, accountName, transformName, jobName, Context.NONE).getValue(); + this.deleteWithResponse(resourceGroupName, accountName, transformName, jobName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveEventsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveEventsClientImpl.java index 8182f925da399..ef5ac58a629ec 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 along with {@link PagedResponse} on successful completion of {@link Mono}. */ @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 along with {@link PagedResponse} on successful completion of {@link Mono}. */ @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 as paginated response with {@link PagedFlux}. */ @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 as paginated response with {@link PagedFlux}. */ @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 as paginated response with {@link PagedIterable}. */ @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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String accountName, Context context) { @@ -413,7 +413,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 properties of a live event. + * @return properties of a live event along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -467,7 +467,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a live event. + * @return properties of a live event along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -517,7 +517,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a live event. + * @return properties of a live event on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String accountName, String liveEventName) { @@ -558,7 +558,7 @@ public LiveEventInner get(String resourceGroupName, String accountName, String l * @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 properties of a live event. + * @return properties of a live event along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -577,7 +577,7 @@ public Response getWithResponse( * @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 live event. + * @return the live event along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -644,7 +644,7 @@ private Mono>> createWithResponseAsync( * @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 live event. + * @return the live event along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -708,9 +708,9 @@ private Mono>> createWithResponseAsync( * @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 live event. + * @return the {@link PollerFlux} for polling of the live event. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LiveEventInner> beginCreateAsync( String resourceGroupName, String accountName, @@ -722,7 +722,11 @@ private PollerFlux, LiveEventInner> beginCreateAsync( return this .client .getLroResult( - mono, this.client.getHttpPipeline(), LiveEventInner.class, LiveEventInner.class, Context.NONE); + mono, + this.client.getHttpPipeline(), + LiveEventInner.class, + LiveEventInner.class, + this.client.getContext()); } /** @@ -737,9 +741,9 @@ private PollerFlux, LiveEventInner> beginCreateAsync( * @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 live event. + * @return the {@link PollerFlux} for polling of the live event. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LiveEventInner> beginCreateAsync( String resourceGroupName, String accountName, @@ -767,9 +771,9 @@ private PollerFlux, LiveEventInner> beginCreateAsync( * @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 live event. + * @return the {@link SyncPoller} for polling of the live event. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LiveEventInner> beginCreate( String resourceGroupName, String accountName, @@ -791,9 +795,9 @@ public SyncPoller, LiveEventInner> beginCreate( * @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 live event. + * @return the {@link SyncPoller} for polling of the live event. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LiveEventInner> beginCreate( String resourceGroupName, String accountName, @@ -816,7 +820,7 @@ public SyncPoller, LiveEventInner> beginCreate( * @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 live event. + * @return the live event on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -840,7 +844,7 @@ private Mono createAsync( * @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 live event. + * @return the live event on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -863,7 +867,7 @@ private Mono createAsync( * @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 live event. + * @return the live event on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -955,7 +959,7 @@ public LiveEventInner create( * @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 live event. + * @return the live event along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -1016,7 +1020,7 @@ private Mono>> updateWithResponseAsync( * @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 live event. + * @return the live event along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -1077,9 +1081,9 @@ private Mono>> updateWithResponseAsync( * @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 live event. + * @return the {@link PollerFlux} for polling of 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 = @@ -1087,7 +1091,11 @@ private PollerFlux, LiveEventInner> beginUpdateAsync( return this .client .getLroResult( - mono, this.client.getHttpPipeline(), LiveEventInner.class, LiveEventInner.class, Context.NONE); + mono, + this.client.getHttpPipeline(), + LiveEventInner.class, + LiveEventInner.class, + this.client.getContext()); } /** @@ -1101,9 +1109,9 @@ private PollerFlux, LiveEventInner> beginUpdateAsync( * @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 live event. + * @return the {@link PollerFlux} for polling of the live event. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LiveEventInner> beginUpdateAsync( String resourceGroupName, String accountName, @@ -1129,9 +1137,9 @@ private PollerFlux, LiveEventInner> beginUpdateAsync( * @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 live event. + * @return the {@link SyncPoller} for polling of 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(); @@ -1148,9 +1156,9 @@ public SyncPoller, LiveEventInner> beginUpdate( * @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 live event. + * @return the {@link SyncPoller} for polling of the live event. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LiveEventInner> beginUpdate( String resourceGroupName, String accountName, @@ -1170,7 +1178,7 @@ public SyncPoller, LiveEventInner> beginUpdate( * @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 live event. + * @return the live event on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1191,7 +1199,7 @@ private Mono updateAsync( * @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 live event. + * @return the live event on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1255,7 +1263,7 @@ public LiveEventInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1309,7 +1317,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1359,15 +1367,16 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @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); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1380,9 +1389,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @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); @@ -1402,9 +1411,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @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(); @@ -1420,9 +1429,9 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @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(); @@ -1437,7 +1446,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String accountName, String liveEventName) { @@ -1456,7 +1465,7 @@ private Mono deleteAsync(String resourceGroupName, String accountName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -1506,7 +1515,7 @@ public void delete(String resourceGroupName, String accountName, String liveEven * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> allocateWithResponseAsync( @@ -1560,7 +1569,7 @@ private Mono>> allocateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> allocateWithResponseAsync( @@ -1610,16 +1619,17 @@ private Mono>> allocateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginAllocateAsync( String resourceGroupName, String accountName, String liveEventName) { Mono>> mono = allocateWithResponseAsync(resourceGroupName, accountName, liveEventName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1632,9 +1642,9 @@ private PollerFlux, Void> beginAllocateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @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); @@ -1654,9 +1664,9 @@ private PollerFlux, Void> beginAllocateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @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(); @@ -1672,9 +1682,9 @@ public SyncPoller, Void> beginAllocate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @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(); @@ -1689,7 +1699,7 @@ public SyncPoller, Void> beginAllocate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono allocateAsync(String resourceGroupName, String accountName, String liveEventName) { @@ -1708,7 +1718,7 @@ private Mono allocateAsync(String resourceGroupName, String accountName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono allocateAsync( @@ -1758,7 +1768,7 @@ public void allocate(String resourceGroupName, String accountName, String liveEv * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> startWithResponseAsync( @@ -1812,7 +1822,7 @@ private Mono>> startWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> startWithResponseAsync( @@ -1862,15 +1872,16 @@ private Mono>> startWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @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); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1883,9 +1894,9 @@ private PollerFlux, Void> beginStartAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @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); @@ -1905,9 +1916,9 @@ private PollerFlux, Void> beginStartAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @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(); @@ -1923,9 +1934,9 @@ public SyncPoller, Void> beginStart( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @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(); @@ -1940,7 +1951,7 @@ public SyncPoller, Void> beginStart( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono startAsync(String resourceGroupName, String accountName, String liveEventName) { @@ -1959,7 +1970,7 @@ private Mono startAsync(String resourceGroupName, String accountName, 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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono startAsync(String resourceGroupName, String accountName, String liveEventName, Context context) { @@ -2009,7 +2020,7 @@ public void start(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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> stopWithResponseAsync( @@ -2070,7 +2081,7 @@ private Mono>> stopWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> stopWithResponseAsync( @@ -2131,16 +2142,17 @@ private Mono>> stopWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStopAsync( String resourceGroupName, String accountName, String liveEventName, LiveEventActionInput parameters) { Mono>> mono = stopWithResponseAsync(resourceGroupName, accountName, liveEventName, parameters); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -2154,9 +2166,9 @@ private PollerFlux, Void> beginStopAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStopAsync( String resourceGroupName, String accountName, @@ -2181,9 +2193,9 @@ private PollerFlux, Void> beginStopAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @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(); @@ -2200,9 +2212,9 @@ public SyncPoller, Void> beginStop( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStop( String resourceGroupName, String accountName, @@ -2222,7 +2234,7 @@ public SyncPoller, Void> beginStop( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono stopAsync( @@ -2243,7 +2255,7 @@ private Mono stopAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono stopAsync( @@ -2307,7 +2319,7 @@ public void stop( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> resetWithResponseAsync( @@ -2363,7 +2375,7 @@ private Mono>> resetWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> resetWithResponseAsync( @@ -2415,15 +2427,16 @@ private Mono>> resetWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @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); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -2438,9 +2451,9 @@ private PollerFlux, Void> beginResetAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @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); @@ -2462,9 +2475,9 @@ private PollerFlux, Void> beginResetAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @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(); @@ -2482,9 +2495,9 @@ public SyncPoller, Void> beginReset( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @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(); @@ -2501,7 +2514,7 @@ public SyncPoller, Void> beginReset( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono resetAsync(String resourceGroupName, String accountName, String liveEventName) { @@ -2522,7 +2535,7 @@ private Mono resetAsync(String resourceGroupName, String accountName, 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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono resetAsync(String resourceGroupName, String accountName, String liveEventName, Context context) { @@ -2573,7 +2586,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 along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -2609,7 +2622,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 along with {@link PagedResponse} on successful completion of {@link Mono}. */ @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 59357c3e0e788..85622496dd4a7 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 along with {@link PagedResponse} on successful completion of {@link Mono}. */ @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 along with {@link PagedResponse} on successful completion of {@link Mono}. */ @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 as paginated response with {@link PagedFlux}. */ @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 as paginated response with {@link PagedFlux}. */ @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 as paginated response with {@link PagedIterable}. */ @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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -350,7 +350,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a live output. + * @return a live output along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -409,7 +409,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a live output. + * @return a live output along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -464,7 +464,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a live output. + * @return a live output on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -509,7 +509,7 @@ public LiveOutputInner get( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a live output. + * @return a live output along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -528,7 +528,7 @@ public Response getWithResponse( * @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 Live Output. + * @return the Live Output along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -598,7 +598,7 @@ private Mono>> createWithResponseAsync( * @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 Live Output. + * @return the Live Output along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -665,9 +665,9 @@ private Mono>> createWithResponseAsync( * @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 Live Output. + * @return the {@link PollerFlux} for polling of the Live Output. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LiveOutputInner> beginCreateAsync( String resourceGroupName, String accountName, @@ -679,7 +679,11 @@ private PollerFlux, LiveOutputInner> beginCreateAsyn return this .client .getLroResult( - mono, this.client.getHttpPipeline(), LiveOutputInner.class, LiveOutputInner.class, Context.NONE); + mono, + this.client.getHttpPipeline(), + LiveOutputInner.class, + LiveOutputInner.class, + this.client.getContext()); } /** @@ -694,9 +698,9 @@ private PollerFlux, LiveOutputInner> beginCreateAsyn * @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 Live Output. + * @return the {@link PollerFlux} for polling of the Live Output. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LiveOutputInner> beginCreateAsync( String resourceGroupName, String accountName, @@ -724,9 +728,9 @@ private PollerFlux, LiveOutputInner> beginCreateAsyn * @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 Live Output. + * @return the {@link SyncPoller} for polling of the Live Output. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LiveOutputInner> beginCreate( String resourceGroupName, String accountName, @@ -749,9 +753,9 @@ public SyncPoller, LiveOutputInner> beginCreate( * @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 Live Output. + * @return the {@link SyncPoller} for polling of the Live Output. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LiveOutputInner> beginCreate( String resourceGroupName, String accountName, @@ -774,7 +778,7 @@ public SyncPoller, LiveOutputInner> beginCreate( * @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 Live Output. + * @return the Live Output on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -800,7 +804,7 @@ private Mono createAsync( * @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 Live Output. + * @return the Live Output on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -873,7 +877,7 @@ public LiveOutputInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -932,7 +936,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -987,16 +991,17 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String accountName, String liveEventName, String liveOutputName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, accountName, liveEventName, liveOutputName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1010,9 +1015,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @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); @@ -1033,9 +1038,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @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(); @@ -1052,9 +1057,9 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @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(); @@ -1070,7 +1075,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -1091,7 +1096,7 @@ private Mono deleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -1142,7 +1147,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 along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1178,7 +1183,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 along with {@link PagedResponse} on successful completion of {@link Mono}. */ @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/LocationsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LocationsClientImpl.java index 3cfa950cbd97f..3cb1e8e7fc146 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LocationsClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LocationsClientImpl.java @@ -74,12 +74,13 @@ Mono> checkNameAvailability( /** * Checks whether the Media Service resource name is available. * - * @param locationName The name of the location. + * @param locationName Location name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from the check name availability request. + * @return the response from the check name availability request along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkNameAvailabilityWithResponseAsync( @@ -123,13 +124,14 @@ private Mono> checkNameAvailabi /** * Checks whether the Media Service resource name is available. * - * @param locationName The name of the location. + * @param locationName Location name. * @param parameters The request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from the check name availability request. + * @return the response from the check name availability request along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkNameAvailabilityWithResponseAsync( @@ -170,12 +172,12 @@ private Mono> checkNameAvailabi /** * Checks whether the Media Service resource name is available. * - * @param locationName The name of the location. + * @param locationName Location name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from the check name availability request. + * @return the response from the check name availability request on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono checkNameAvailabilityAsync( @@ -194,7 +196,7 @@ private Mono checkNameAvailabilityAsync( /** * Checks whether the Media Service resource name is available. * - * @param locationName The name of the location. + * @param locationName Location name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -210,13 +212,13 @@ public EntityNameAvailabilityCheckOutputInner checkNameAvailability( /** * Checks whether the Media Service resource name is available. * - * @param locationName The name of the location. + * @param locationName Location name. * @param parameters The request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from the check name availability request. + * @return the response from the check name availability request along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response checkNameAvailabilityWithResponse( diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceImpl.java index 6ba1c7bbfb0ae..2516547e28760 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceImpl.java @@ -16,6 +16,7 @@ import com.azure.resourcemanager.mediaservices.models.MediaService; import com.azure.resourcemanager.mediaservices.models.MediaServiceIdentity; import com.azure.resourcemanager.mediaservices.models.MediaServiceUpdate; +import com.azure.resourcemanager.mediaservices.models.ProvisioningState; import com.azure.resourcemanager.mediaservices.models.PublicNetworkAccess; import com.azure.resourcemanager.mediaservices.models.StorageAccount; import com.azure.resourcemanager.mediaservices.models.StorageAuthentication; @@ -55,14 +56,14 @@ public Map tags() { } } - public MediaServiceIdentity identity() { - return this.innerModel().identity(); - } - public SystemData systemData() { return this.innerModel().systemData(); } + public MediaServiceIdentity identity() { + return this.innerModel().identity(); + } + public UUID mediaServiceId() { return this.innerModel().mediaServiceId(); } @@ -92,6 +93,14 @@ public PublicNetworkAccess publicNetworkAccess() { return this.innerModel().publicNetworkAccess(); } + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public Object privateEndpointConnections() { + return this.innerModel().privateEndpointConnections(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -124,8 +133,7 @@ public MediaService create() { serviceManager .serviceClient() .getMediaservices() - .createOrUpdateWithResponse(resourceGroupName, accountName, this.innerModel(), Context.NONE) - .getValue(); + .createOrUpdate(resourceGroupName, accountName, this.innerModel(), Context.NONE); return this; } @@ -134,8 +142,7 @@ public MediaService create(Context context) { serviceManager .serviceClient() .getMediaservices() - .createOrUpdateWithResponse(resourceGroupName, accountName, this.innerModel(), context) - .getValue(); + .createOrUpdate(resourceGroupName, accountName, this.innerModel(), context); return this; } @@ -155,8 +162,7 @@ public MediaService apply() { serviceManager .serviceClient() .getMediaservices() - .updateWithResponse(resourceGroupName, accountName, updateParameters, Context.NONE) - .getValue(); + .update(resourceGroupName, accountName, updateParameters, Context.NONE); return this; } @@ -165,8 +171,7 @@ public MediaService apply(Context context) { serviceManager .serviceClient() .getMediaservices() - .updateWithResponse(resourceGroupName, accountName, updateParameters, context) - .getValue(); + .update(resourceGroupName, accountName, updateParameters, context); return this; } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationResultsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationResultsClientImpl.java new file mode 100644 index 0000000000000..98567287c09ea --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationResultsClientImpl.java @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mediaservices.fluent.MediaServiceOperationResultsClient; +import com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceInner; +import com.azure.resourcemanager.mediaservices.models.MediaServiceOperationResultsGetResponse; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in MediaServiceOperationResultsClient. */ +public final class MediaServiceOperationResultsClientImpl implements MediaServiceOperationResultsClient { + private final ClientLogger logger = new ClientLogger(MediaServiceOperationResultsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final MediaServiceOperationResultsService service; + + /** The service client containing this operation class. */ + private final AzureMediaServicesImpl client; + + /** + * Initializes an instance of MediaServiceOperationResultsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + MediaServiceOperationResultsClientImpl(AzureMediaServicesImpl client) { + this.service = + RestProxy + .create( + MediaServiceOperationResultsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMediaServicesMediaServiceOperationResults to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMediaServicesMe") + private interface MediaServiceOperationResultsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}" + + "/mediaServiceOperationResults/{operationId}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("locationName") String locationName, + @PathParam("operationId") String operationId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get media service operation result. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return media service operation result on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getWithResponseAsync( + String locationName, String operationId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + locationName, + operationId, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get media service operation result. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return media service operation result on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getWithResponseAsync( + String locationName, String operationId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + locationName, + operationId, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get media service operation result. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return media service operation result on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String locationName, String operationId) { + return getWithResponseAsync(locationName, operationId) + .flatMap( + (MediaServiceOperationResultsGetResponse res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get media service operation result. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return media service operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MediaServiceInner get(String locationName, String operationId) { + return getAsync(locationName, operationId).block(); + } + + /** + * Get media service operation result. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return media service operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MediaServiceOperationResultsGetResponse getWithResponse( + String locationName, String operationId, Context context) { + return getWithResponseAsync(locationName, operationId, context).block(); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationResultsImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationResultsImpl.java new file mode 100644 index 0000000000000..0ab9bef1ff7bc --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationResultsImpl.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mediaservices.fluent.MediaServiceOperationResultsClient; +import com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceInner; +import com.azure.resourcemanager.mediaservices.models.MediaService; +import com.azure.resourcemanager.mediaservices.models.MediaServiceOperationResults; +import com.azure.resourcemanager.mediaservices.models.MediaServiceOperationResultsGetResponse; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class MediaServiceOperationResultsImpl implements MediaServiceOperationResults { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MediaServiceOperationResultsImpl.class); + + private final MediaServiceOperationResultsClient innerClient; + + private final com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager; + + public MediaServiceOperationResultsImpl( + MediaServiceOperationResultsClient innerClient, + com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public MediaService get(String locationName, String operationId) { + MediaServiceInner inner = this.serviceClient().get(locationName, operationId); + if (inner != null) { + return new MediaServiceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse(String locationName, String operationId, Context context) { + MediaServiceOperationResultsGetResponse inner = + this.serviceClient().getWithResponse(locationName, operationId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new MediaServiceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + private MediaServiceOperationResultsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.mediaservices.MediaServicesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationStatusImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationStatusImpl.java new file mode 100644 index 0000000000000..7eafea5d0fe82 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationStatusImpl.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceOperationStatusInner; +import com.azure.resourcemanager.mediaservices.models.MediaServiceOperationStatus; +import java.time.OffsetDateTime; + +public final class MediaServiceOperationStatusImpl implements MediaServiceOperationStatus { + private MediaServiceOperationStatusInner innerObject; + + private final com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager; + + MediaServiceOperationStatusImpl( + MediaServiceOperationStatusInner innerObject, + com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String name() { + return this.innerModel().name(); + } + + public String id() { + return this.innerModel().id(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public String status() { + return this.innerModel().status(); + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public MediaServiceOperationStatusInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.mediaservices.MediaServicesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationStatusesClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationStatusesClientImpl.java new file mode 100644 index 0000000000000..6d08e637b2cfb --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationStatusesClientImpl.java @@ -0,0 +1,223 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mediaservices.fluent.MediaServiceOperationStatusesClient; +import com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceOperationStatusInner; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in MediaServiceOperationStatusesClient. */ +public final class MediaServiceOperationStatusesClientImpl implements MediaServiceOperationStatusesClient { + private final ClientLogger logger = new ClientLogger(MediaServiceOperationStatusesClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final MediaServiceOperationStatusesService service; + + /** The service client containing this operation class. */ + private final AzureMediaServicesImpl client; + + /** + * Initializes an instance of MediaServiceOperationStatusesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + MediaServiceOperationStatusesClientImpl(AzureMediaServicesImpl client) { + this.service = + RestProxy + .create( + MediaServiceOperationStatusesService.class, + client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMediaServicesMediaServiceOperationStatuses to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMediaServicesMe") + private interface MediaServiceOperationStatusesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}" + + "/mediaServiceOperationStatuses/{operationId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("locationName") String locationName, + @PathParam("operationId") String operationId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get media service operation status. + * + * @param locationName Location name. + * @param operationId Operation ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return media service operation status along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String locationName, String operationId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + locationName, + operationId, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get media service operation status. + * + * @param locationName Location name. + * @param operationId Operation ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return media service operation status along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String locationName, String operationId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + locationName, + operationId, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get media service operation status. + * + * @param locationName Location name. + * @param operationId Operation ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return media service operation status on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String locationName, String operationId) { + return getWithResponseAsync(locationName, operationId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get media service operation status. + * + * @param locationName Location name. + * @param operationId Operation ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return media service operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MediaServiceOperationStatusInner get(String locationName, String operationId) { + return getAsync(locationName, operationId).block(); + } + + /** + * Get media service operation status. + * + * @param locationName Location name. + * @param operationId Operation ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return media service operation status along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String locationName, String operationId, Context context) { + return getWithResponseAsync(locationName, operationId, context).block(); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationStatusesImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationStatusesImpl.java new file mode 100644 index 0000000000000..194fc67914898 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationStatusesImpl.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mediaservices.fluent.MediaServiceOperationStatusesClient; +import com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceOperationStatusInner; +import com.azure.resourcemanager.mediaservices.models.MediaServiceOperationStatus; +import com.azure.resourcemanager.mediaservices.models.MediaServiceOperationStatuses; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class MediaServiceOperationStatusesImpl implements MediaServiceOperationStatuses { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MediaServiceOperationStatusesImpl.class); + + private final MediaServiceOperationStatusesClient innerClient; + + private final com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager; + + public MediaServiceOperationStatusesImpl( + MediaServiceOperationStatusesClient innerClient, + com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public MediaServiceOperationStatus get(String locationName, String operationId) { + MediaServiceOperationStatusInner inner = this.serviceClient().get(locationName, operationId); + if (inner != null) { + return new MediaServiceOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String locationName, String operationId, Context context) { + Response inner = + this.serviceClient().getWithResponse(locationName, operationId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new MediaServiceOperationStatusImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + private MediaServiceOperationStatusesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.mediaservices.MediaServicesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaservicesClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaservicesClientImpl.java index aa82a318be8b9..92ff14132211e 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaservicesClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaservicesClientImpl.java @@ -28,9 +28,12 @@ import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.mediaservices.fluent.MediaservicesClient; import com.azure.resourcemanager.mediaservices.fluent.models.EdgePoliciesInner; import com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceInner; @@ -38,6 +41,8 @@ import com.azure.resourcemanager.mediaservices.models.MediaServiceCollection; import com.azure.resourcemanager.mediaservices.models.MediaServiceUpdate; import com.azure.resourcemanager.mediaservices.models.SyncStorageKeysInput; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in MediaservicesClient. */ @@ -103,7 +108,7 @@ Mono> getByResourceGroup( + "/{accountName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( + Mono>> createOrUpdate( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -132,9 +137,9 @@ Mono> delete( @Patch( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices" + "/{accountName}") - @ExpectedResponses({200}) + @ExpectedResponses({202}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( + Mono>> update( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -215,7 +220,8 @@ Mono> listBySubscriptionNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of MediaService items. + * @return a collection of MediaService items along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { @@ -267,7 +273,8 @@ private Mono> listByResourceGroupSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of MediaService items. + * @return a collection of MediaService items along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -316,7 +323,7 @@ private Mono> listByResourceGroupSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of MediaService items. + * @return a collection of MediaService items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -332,7 +339,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of MediaService items. + * @return a collection of MediaService items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { @@ -348,7 +355,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of MediaService items. + * @return a collection of MediaService items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -363,7 +370,7 @@ public PagedIterable listByResourceGroup(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of MediaService items. + * @return a collection of MediaService items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -378,7 +385,8 @@ public PagedIterable listByResourceGroup(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Media Services account. + * @return the details of a Media Services account along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -427,7 +435,8 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Media Services account. + * @return the details of a Media Services account along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -472,7 +481,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Media Services account. + * @return the details of a Media Services account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String accountName) { @@ -511,7 +520,7 @@ public MediaServiceInner getByResourceGroup(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 details of a Media Services account. + * @return the details of a Media Services account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -528,10 +537,10 @@ public Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Media Services account. + * @return a Media Services account along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( + private Mono>> createOrUpdateWithResponseAsync( String resourceGroupName, String accountName, MediaServiceInner parameters) { if (this.client.getEndpoint() == null) { return Mono @@ -584,10 +593,10 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Media Services account. + * @return a Media Services account along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( + private Mono>> createOrUpdateWithResponseAsync( String resourceGroupName, String accountName, MediaServiceInner parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -636,20 +645,119 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Media Services account. + * @return the {@link PollerFlux} for polling of a Media Services account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, MediaServiceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String accountName, MediaServiceInner parameters) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, accountName, parameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + MediaServiceInner.class, + MediaServiceInner.class, + this.client.getContext()); + } + + /** + * Creates or updates a Media Services account. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a Media Services account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, MediaServiceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String accountName, MediaServiceInner parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, accountName, parameters, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), MediaServiceInner.class, MediaServiceInner.class, context); + } + + /** + * Creates or updates a Media Services account. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a Media Services account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MediaServiceInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, MediaServiceInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, parameters).getSyncPoller(); + } + + /** + * Creates or updates a Media Services account. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a Media Services account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MediaServiceInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, MediaServiceInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, parameters, context).getSyncPoller(); + } + + /** + * Creates or updates a Media Services account. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Media Services account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( String resourceGroupName, String accountName, MediaServiceInner parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, accountName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return beginCreateOrUpdateAsync(resourceGroupName, accountName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a Media Services account. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Media Services account on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String accountName, MediaServiceInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -682,9 +790,9 @@ public MediaServiceInner createOrUpdate( * @return a Media Services account. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( + public MediaServiceInner createOrUpdate( String resourceGroupName, String accountName, MediaServiceInner parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, accountName, parameters, context).block(); + return createOrUpdateAsync(resourceGroupName, accountName, parameters, context).block(); } /** @@ -695,7 +803,7 @@ public Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName) { @@ -743,7 +851,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -788,7 +896,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String accountName) { @@ -818,7 +926,7 @@ public void delete(String resourceGroupName, String accountName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String accountName, Context context) { @@ -834,10 +942,10 @@ public Response deleteWithResponse(String resourceGroupName, String accoun * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Media Services account. + * @return a Media Services account along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( + private Mono>> updateWithResponseAsync( String resourceGroupName, String accountName, MediaServiceUpdate parameters) { if (this.client.getEndpoint() == null) { return Mono @@ -890,10 +998,10 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Media Services account. + * @return a Media Services account along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( + private Mono>> updateWithResponseAsync( String resourceGroupName, String accountName, MediaServiceUpdate parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -942,20 +1050,118 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Media Services account. + * @return the {@link PollerFlux} for polling of a Media Services account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, MediaServiceInner> beginUpdateAsync( + String resourceGroupName, String accountName, MediaServiceUpdate parameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, accountName, parameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + MediaServiceInner.class, + MediaServiceInner.class, + this.client.getContext()); + } + + /** + * Updates an existing Media Services account. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a Media Services account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, MediaServiceInner> beginUpdateAsync( + String resourceGroupName, String accountName, MediaServiceUpdate parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateWithResponseAsync(resourceGroupName, accountName, parameters, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), MediaServiceInner.class, MediaServiceInner.class, context); + } + + /** + * Updates an existing Media Services account. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a Media Services account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MediaServiceInner> beginUpdate( + String resourceGroupName, String accountName, MediaServiceUpdate parameters) { + return beginUpdateAsync(resourceGroupName, accountName, parameters).getSyncPoller(); + } + + /** + * Updates an existing Media Services account. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a Media Services account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MediaServiceInner> beginUpdate( + String resourceGroupName, String accountName, MediaServiceUpdate parameters, Context context) { + return beginUpdateAsync(resourceGroupName, accountName, parameters, context).getSyncPoller(); + } + + /** + * Updates an existing Media Services account. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Media Services account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( String resourceGroupName, String accountName, MediaServiceUpdate parameters) { - return updateWithResponseAsync(resourceGroupName, accountName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return beginUpdateAsync(resourceGroupName, accountName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates an existing Media Services account. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Media Services account on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String accountName, MediaServiceUpdate parameters, Context context) { + return beginUpdateAsync(resourceGroupName, accountName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -987,9 +1193,9 @@ public MediaServiceInner update(String resourceGroupName, String accountName, Me * @return a Media Services account. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( + public MediaServiceInner update( String resourceGroupName, String accountName, MediaServiceUpdate parameters, Context context) { - return updateWithResponseAsync(resourceGroupName, accountName, parameters, context).block(); + return updateAsync(resourceGroupName, accountName, parameters, context).block(); } /** @@ -1001,7 +1207,7 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> syncStorageKeysWithResponseAsync( @@ -1057,7 +1263,7 @@ private Mono> syncStorageKeysWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> syncStorageKeysWithResponseAsync( @@ -1109,7 +1315,7 @@ private Mono> syncStorageKeysWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono syncStorageKeysAsync( @@ -1143,7 +1349,7 @@ public void syncStorageKeys(String resourceGroupName, String accountName, SyncSt * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response syncStorageKeysWithResponse( @@ -1152,7 +1358,7 @@ public Response syncStorageKeysWithResponse( } /** - * List the media edge policies associated with the Media Services account. + * List all the media edge policies associated with the Media Services account. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -1160,7 +1366,7 @@ public Response syncStorageKeysWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listEdgePoliciesWithResponseAsync( @@ -1207,7 +1413,7 @@ private Mono> listEdgePoliciesWithResponseAsync( } /** - * List the media edge policies associated with the Media Services account. + * List all the media edge policies associated with the Media Services account. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -1216,7 +1422,7 @@ private Mono> listEdgePoliciesWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listEdgePoliciesWithResponseAsync( @@ -1260,7 +1466,7 @@ private Mono> listEdgePoliciesWithResponseAsync( } /** - * List the media edge policies associated with the Media Services account. + * List all the media edge policies associated with the Media Services account. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -1268,7 +1474,7 @@ private Mono> listEdgePoliciesWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listEdgePoliciesAsync( @@ -1285,7 +1491,7 @@ private Mono listEdgePoliciesAsync( } /** - * List the media edge policies associated with the Media Services account. + * List all the media edge policies associated with the Media Services account. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -1302,7 +1508,7 @@ public EdgePoliciesInner listEdgePolicies( } /** - * List the media edge policies associated with the Media Services account. + * List all the media edge policies associated with the Media Services account. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -1311,7 +1517,7 @@ public EdgePoliciesInner listEdgePolicies( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listEdgePoliciesWithResponse( @@ -1324,7 +1530,8 @@ public Response listEdgePoliciesWithResponse( * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of MediaService items. + * @return a collection of MediaService items along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -1370,7 +1577,8 @@ 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 a collection of MediaService items. + * @return a collection of MediaService items along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -1411,7 +1619,7 @@ private Mono> listSinglePageAsync(Context conte * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of MediaService items. + * @return a collection of MediaService items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -1426,7 +1634,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 a collection of MediaService items. + * @return a collection of MediaService items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -1439,7 +1647,7 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of MediaService items. + * @return a collection of MediaService items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -1453,7 +1661,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of MediaService items. + * @return a collection of MediaService items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -1467,7 +1675,8 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of MediaService items. + * @return a collection of MediaService items along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1503,7 +1712,8 @@ private Mono> listNextSinglePageAsync(String ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of MediaService items. + * @return a collection of MediaService items along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1538,7 +1748,8 @@ private Mono> listNextSinglePageAsync(String ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of MediaService items. + * @return a collection of MediaService items along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -1575,7 +1786,8 @@ private Mono> listBySubscriptionNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of MediaService items. + * @return a collection of MediaService items along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync( diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaservicesImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaservicesImpl.java index 9a6f1e00c0cea..27a71f531299a 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaservicesImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaservicesImpl.java @@ -172,7 +172,7 @@ public void deleteById(String id) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'mediaservices'.", id))); } - this.deleteWithResponse(resourceGroupName, accountName, Context.NONE).getValue(); + this.deleteWithResponse(resourceGroupName, accountName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationResultsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationResultsClientImpl.java new file mode 100644 index 0000000000000..5e43509016e78 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationResultsClientImpl.java @@ -0,0 +1,275 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mediaservices.fluent.OperationResultsClient; +import com.azure.resourcemanager.mediaservices.fluent.models.AssetTrackInner; +import com.azure.resourcemanager.mediaservices.models.OperationResultsGetResponse; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in OperationResultsClient. */ +public final class OperationResultsClientImpl implements OperationResultsClient { + private final ClientLogger logger = new ClientLogger(OperationResultsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final OperationResultsService service; + + /** The service client containing this operation class. */ + private final AzureMediaServicesImpl client; + + /** + * Initializes an instance of OperationResultsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OperationResultsClientImpl(AzureMediaServicesImpl client) { + this.service = + RestProxy.create(OperationResultsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMediaServicesOperationResults to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMediaServicesOp") + private interface OperationResultsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices" + + "/{accountName}/assets/{assetName}/tracks/{trackName}/operationResults/{operationId}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("assetName") String assetName, + @PathParam("trackName") String trackName, + @PathParam("operationId") String operationId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get asset track operation result. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return asset track operation result on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getWithResponseAsync( + String resourceGroupName, String accountName, String assetName, String trackName, String operationId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (assetName == null) { + return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null.")); + } + if (trackName == null) { + return Mono.error(new IllegalArgumentException("Parameter trackName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + assetName, + trackName, + operationId, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get asset track operation result. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return asset track operation result on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getWithResponseAsync( + String resourceGroupName, + String accountName, + String assetName, + String trackName, + String operationId, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (assetName == null) { + return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null.")); + } + if (trackName == null) { + return Mono.error(new IllegalArgumentException("Parameter trackName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + assetName, + trackName, + operationId, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get asset track operation result. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return asset track operation result on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String accountName, String assetName, String trackName, String operationId) { + return getWithResponseAsync(resourceGroupName, accountName, assetName, trackName, operationId) + .flatMap( + (OperationResultsGetResponse res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get asset track operation result. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return asset track operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AssetTrackInner get( + String resourceGroupName, String accountName, String assetName, String trackName, String operationId) { + return getAsync(resourceGroupName, accountName, assetName, trackName, operationId).block(); + } + + /** + * Get asset track operation result. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return asset track operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationResultsGetResponse getWithResponse( + String resourceGroupName, + String accountName, + String assetName, + String trackName, + String operationId, + Context context) { + return getWithResponseAsync(resourceGroupName, accountName, assetName, trackName, operationId, context).block(); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationResultsImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationResultsImpl.java new file mode 100644 index 0000000000000..112d4b15a9d6b --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationResultsImpl.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mediaservices.fluent.OperationResultsClient; +import com.azure.resourcemanager.mediaservices.fluent.models.AssetTrackInner; +import com.azure.resourcemanager.mediaservices.models.AssetTrack; +import com.azure.resourcemanager.mediaservices.models.OperationResults; +import com.azure.resourcemanager.mediaservices.models.OperationResultsGetResponse; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class OperationResultsImpl implements OperationResults { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationResultsImpl.class); + + private final OperationResultsClient innerClient; + + private final com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager; + + public OperationResultsImpl( + OperationResultsClient innerClient, + com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public AssetTrack get( + String resourceGroupName, String accountName, String assetName, String trackName, String operationId) { + AssetTrackInner inner = + this.serviceClient().get(resourceGroupName, accountName, assetName, trackName, operationId); + if (inner != null) { + return new AssetTrackImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String resourceGroupName, + String accountName, + String assetName, + String trackName, + String operationId, + Context context) { + OperationResultsGetResponse inner = + this + .serviceClient() + .getWithResponse(resourceGroupName, accountName, assetName, trackName, operationId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new AssetTrackImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + private OperationResultsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.mediaservices.MediaServicesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationStatusesClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationStatusesClientImpl.java new file mode 100644 index 0000000000000..206c2ad2f6eb7 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationStatusesClientImpl.java @@ -0,0 +1,275 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mediaservices.fluent.OperationStatusesClient; +import com.azure.resourcemanager.mediaservices.fluent.models.AssetTrackOperationStatusInner; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in OperationStatusesClient. */ +public final class OperationStatusesClientImpl implements OperationStatusesClient { + private final ClientLogger logger = new ClientLogger(OperationStatusesClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final OperationStatusesService service; + + /** The service client containing this operation class. */ + private final AzureMediaServicesImpl client; + + /** + * Initializes an instance of OperationStatusesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OperationStatusesClientImpl(AzureMediaServicesImpl client) { + this.service = + RestProxy.create(OperationStatusesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMediaServicesOperationStatuses to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMediaServicesOp") + private interface OperationStatusesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices" + + "/{accountName}/assets/{assetName}/tracks/{trackName}/operationStatuses/{operationId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("assetName") String assetName, + @PathParam("trackName") String trackName, + @PathParam("operationId") String operationId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get asset track operation status. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return asset track operation status along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String accountName, String assetName, String trackName, String operationId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (assetName == null) { + return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null.")); + } + if (trackName == null) { + return Mono.error(new IllegalArgumentException("Parameter trackName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + assetName, + trackName, + operationId, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get asset track operation status. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return asset track operation status along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, + String accountName, + String assetName, + String trackName, + String operationId, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (assetName == null) { + return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null.")); + } + if (trackName == null) { + return Mono.error(new IllegalArgumentException("Parameter trackName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + assetName, + trackName, + operationId, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get asset track operation status. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return asset track operation status on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String accountName, String assetName, String trackName, String operationId) { + return getWithResponseAsync(resourceGroupName, accountName, assetName, trackName, operationId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get asset track operation status. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return asset track operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AssetTrackOperationStatusInner get( + String resourceGroupName, String accountName, String assetName, String trackName, String operationId) { + return getAsync(resourceGroupName, accountName, assetName, trackName, operationId).block(); + } + + /** + * Get asset track operation status. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return asset track operation status along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, + String accountName, + String assetName, + String trackName, + String operationId, + Context context) { + return getWithResponseAsync(resourceGroupName, accountName, assetName, trackName, operationId, context).block(); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationStatusesImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationStatusesImpl.java new file mode 100644 index 0000000000000..95b8353408a93 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationStatusesImpl.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mediaservices.fluent.OperationStatusesClient; +import com.azure.resourcemanager.mediaservices.fluent.models.AssetTrackOperationStatusInner; +import com.azure.resourcemanager.mediaservices.models.AssetTrackOperationStatus; +import com.azure.resourcemanager.mediaservices.models.OperationStatuses; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class OperationStatusesImpl implements OperationStatuses { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationStatusesImpl.class); + + private final OperationStatusesClient innerClient; + + private final com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager; + + public OperationStatusesImpl( + OperationStatusesClient innerClient, + com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public AssetTrackOperationStatus get( + String resourceGroupName, String accountName, String assetName, String trackName, String operationId) { + AssetTrackOperationStatusInner inner = + this.serviceClient().get(resourceGroupName, accountName, assetName, trackName, operationId); + if (inner != null) { + return new AssetTrackOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String resourceGroupName, + String accountName, + String assetName, + String trackName, + String operationId, + Context context) { + Response inner = + this + .serviceClient() + .getWithResponse(resourceGroupName, accountName, assetName, trackName, operationId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new AssetTrackOperationStatusImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + private OperationStatusesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.mediaservices.MediaServicesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationsClientImpl.java index 115d729abbad4..9acad23d655c8 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationsClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationsClientImpl.java @@ -69,7 +69,7 @@ Mono> list( * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of Operation items. + * @return a collection of Operation items along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync() { @@ -93,7 +93,7 @@ private Mono> listWithResponseAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of Operation items. + * @return a collection of Operation items along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync(Context context) { @@ -113,7 +113,7 @@ private Mono> listWithResponseAsync(Context c * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of Operation items. + * @return a collection of Operation items on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listAsync() { @@ -147,7 +147,7 @@ public OperationCollectionInner list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of Operation items. + * @return a collection of Operation items along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listWithResponse(Context context) { diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/PrivateEndpointConnectionsClientImpl.java index dfa817581b9b1..27b5efe863af6 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/PrivateEndpointConnectionsClientImpl.java @@ -126,14 +126,15 @@ Mono> delete( } /** - * Get all private endpoint connections. + * List all private endpoint connections. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections. + * @return list of private endpoint connection associated with the specified storage account along with {@link + * Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync( @@ -174,7 +175,7 @@ private Mono> listWithRespons } /** - * Get all private endpoint connections. + * List all private endpoint connections. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -182,7 +183,8 @@ private Mono> listWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections. + * @return list of private endpoint connection associated with the specified storage account along with {@link + * Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync( @@ -220,14 +222,15 @@ private Mono> listWithRespons } /** - * Get all private endpoint connections. + * List all private endpoint connections. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections. + * @return list of private endpoint connection associated with the specified storage account on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listAsync(String resourceGroupName, String accountName) { @@ -243,14 +246,14 @@ private Mono listAsync(String resource } /** - * Get all private endpoint connections. + * List all private endpoint connections. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections. + * @return list of private endpoint connection associated with the specified storage account. */ @ServiceMethod(returns = ReturnType.SINGLE) public PrivateEndpointConnectionListResultInner list(String resourceGroupName, String accountName) { @@ -258,7 +261,7 @@ public PrivateEndpointConnectionListResultInner list(String resourceGroupName, S } /** - * Get all private endpoint connections. + * List all private endpoint connections. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -266,7 +269,8 @@ public PrivateEndpointConnectionListResultInner list(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections. + * @return list of private endpoint connection associated with the specified storage account along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listWithResponse( @@ -275,7 +279,7 @@ public Response listWithResponse( } /** - * Get private endpoint connection. + * Get the details of a private endpoint connection. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -283,7 +287,8 @@ public Response listWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection. + * @return the details of a private endpoint connection along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -328,7 +333,7 @@ private Mono> getWithResponseAsync( } /** - * Get private endpoint connection. + * Get the details of a private endpoint connection. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -337,7 +342,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection. + * @return the details of a private endpoint connection along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -379,7 +385,7 @@ private Mono> getWithResponseAsync( } /** - * Get private endpoint connection. + * Get the details of a private endpoint connection. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -387,7 +393,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection. + * @return the details of a private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String accountName, String name) { @@ -403,7 +409,7 @@ private Mono getAsync(String resourceGroupName, } /** - * Get private endpoint connection. + * Get the details of a private endpoint connection. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -411,7 +417,7 @@ private Mono getAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection. + * @return the details of a private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) public PrivateEndpointConnectionInner get(String resourceGroupName, String accountName, String name) { @@ -419,7 +425,7 @@ public PrivateEndpointConnectionInner get(String resourceGroupName, String accou } /** - * Get private endpoint connection. + * Get the details of a private endpoint connection. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -428,7 +434,7 @@ public PrivateEndpointConnectionInner get(String resourceGroupName, String accou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection. + * @return the details of a private endpoint connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -437,7 +443,7 @@ public Response getWithResponse( } /** - * Update private endpoint connection. + * Update an existing private endpoint connection. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -446,7 +452,8 @@ public Response getWithResponse( * @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 Private Endpoint Connection resource. + * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -497,7 +504,7 @@ private Mono> createOrUpdateWithRespons } /** - * Update private endpoint connection. + * Update an existing private endpoint connection. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -507,7 +514,8 @@ private Mono> createOrUpdateWithRespons * @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 Private Endpoint Connection resource. + * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -559,7 +567,7 @@ private Mono> createOrUpdateWithRespons } /** - * Update private endpoint connection. + * Update an existing private endpoint connection. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -568,7 +576,7 @@ private Mono> createOrUpdateWithRespons * @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 Private Endpoint Connection resource. + * @return the Private Endpoint Connection resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -585,7 +593,7 @@ private Mono createOrUpdateAsync( } /** - * Update private endpoint connection. + * Update an existing private endpoint connection. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -603,7 +611,7 @@ public PrivateEndpointConnectionInner createOrUpdate( } /** - * Update private endpoint connection. + * Update an existing private endpoint connection. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -613,7 +621,7 @@ public PrivateEndpointConnectionInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. + * @return the Private Endpoint Connection resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( @@ -626,7 +634,7 @@ public Response createOrUpdateWithResponse( } /** - * Delete private endpoint connection. + * Deletes a private endpoint connection. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -634,7 +642,7 @@ public Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName, String name) { @@ -678,7 +686,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S } /** - * Delete private endpoint connection. + * Deletes a private endpoint connection. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -687,7 +695,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -729,7 +737,7 @@ private Mono> deleteWithResponseAsync( } /** - * Delete private endpoint connection. + * Deletes a private endpoint connection. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -737,7 +745,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String accountName, String name) { @@ -746,7 +754,7 @@ private Mono deleteAsync(String resourceGroupName, String accountName, Str } /** - * Delete private endpoint connection. + * Deletes a private endpoint connection. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -761,7 +769,7 @@ public void delete(String resourceGroupName, String accountName, String name) { } /** - * Delete private endpoint connection. + * Deletes a private endpoint connection. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -770,7 +778,7 @@ public void delete(String resourceGroupName, String accountName, String name) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse( diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/PrivateEndpointConnectionsImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/PrivateEndpointConnectionsImpl.java index 9f54cbc42d510..4d39fd99e89e1 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/PrivateEndpointConnectionsImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/PrivateEndpointConnectionsImpl.java @@ -171,7 +171,7 @@ public void deleteById(String id) { "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); } - this.deleteWithResponse(resourceGroupName, accountName, name, Context.NONE).getValue(); + this.deleteWithResponse(resourceGroupName, accountName, name, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/PrivateLinkResourcesClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/PrivateLinkResourcesClientImpl.java index c92e334c5afaa..f8aa7bdc31a0d 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/PrivateLinkResourcesClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/PrivateLinkResourcesClientImpl.java @@ -89,14 +89,14 @@ Mono> get( } /** - * Get list of group IDs. + * List supported group IDs. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of group IDs. + * @return a list of private link resources along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync( @@ -137,7 +137,7 @@ private Mono> listWithResponseAsync } /** - * Get list of group IDs. + * List supported group IDs. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -145,7 +145,7 @@ private Mono> listWithResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of group IDs. + * @return a list of private link resources along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync( @@ -183,14 +183,14 @@ private Mono> listWithResponseAsync } /** - * Get list of group IDs. + * List supported group IDs. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of group IDs. + * @return a list of private link resources on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listAsync(String resourceGroupName, String accountName) { @@ -206,14 +206,14 @@ private Mono listAsync(String resourceGroupN } /** - * Get list of group IDs. + * List supported group IDs. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of group IDs. + * @return a list of private link resources. */ @ServiceMethod(returns = ReturnType.SINGLE) public PrivateLinkResourceListResultInner list(String resourceGroupName, String accountName) { @@ -221,7 +221,7 @@ public PrivateLinkResourceListResultInner list(String resourceGroupName, String } /** - * Get list of group IDs. + * List supported group IDs. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -229,7 +229,7 @@ public PrivateLinkResourceListResultInner list(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of group IDs. + * @return a list of private link resources along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listWithResponse( @@ -238,7 +238,7 @@ public Response listWithResponse( } /** - * Get group ID. + * Get details of a group ID. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -246,7 +246,7 @@ public Response listWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return group ID. + * @return details of a group ID along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -291,7 +291,7 @@ private Mono> getWithResponseAsync( } /** - * Get group ID. + * Get details of a group ID. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -300,7 +300,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return group ID. + * @return details of a group ID along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -342,7 +342,7 @@ private Mono> getWithResponseAsync( } /** - * Get group ID. + * Get details of a group ID. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -350,7 +350,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return group ID. + * @return details of a group ID on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String accountName, String name) { @@ -366,7 +366,7 @@ private Mono getAsync(String resourceGroupName, String } /** - * Get group ID. + * Get details of a group ID. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -374,7 +374,7 @@ private Mono getAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return group ID. + * @return details of a group ID. */ @ServiceMethod(returns = ReturnType.SINGLE) public PrivateLinkResourceInner get(String resourceGroupName, String accountName, String name) { @@ -382,7 +382,7 @@ public PrivateLinkResourceInner get(String resourceGroupName, String accountName } /** - * Get group ID. + * Get details of a group ID. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -391,7 +391,7 @@ public PrivateLinkResourceInner get(String resourceGroupName, String accountName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return group ID. + * @return details of a group ID along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingEndpointImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingEndpointImpl.java index ee09eaa393f6e..5608bece16251 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 @@ -8,6 +8,7 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.mediaservices.fluent.models.StreamingEndpointInner; +import com.azure.resourcemanager.mediaservices.models.ArmStreamingEndpointCurrentSku; import com.azure.resourcemanager.mediaservices.models.CrossSiteAccessPolicies; import com.azure.resourcemanager.mediaservices.models.StreamingEndpoint; import com.azure.resourcemanager.mediaservices.models.StreamingEndpointAccessControl; @@ -53,11 +54,15 @@ public SystemData systemData() { return this.innerModel().systemData(); } + public ArmStreamingEndpointCurrentSku sku() { + return this.innerModel().sku(); + } + public String description() { return this.innerModel().description(); } - public Integer scaleUnits() { + public int scaleUnits() { return this.innerModel().scaleUnits(); } @@ -277,12 +282,17 @@ public StreamingEndpointImpl withTags(Map tags) { return this; } + public StreamingEndpointImpl withSku(ArmStreamingEndpointCurrentSku sku) { + this.innerModel().withSku(sku); + return this; + } + public StreamingEndpointImpl withDescription(String description) { this.innerModel().withDescription(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/StreamingEndpointSkuInfoListResultImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingEndpointSkuInfoListResultImpl.java new file mode 100644 index 0000000000000..0ccf7d44ad305 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingEndpointSkuInfoListResultImpl.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.implementation; + +import com.azure.resourcemanager.mediaservices.fluent.models.StreamingEndpointSkuInfoListResultInner; +import com.azure.resourcemanager.mediaservices.models.ArmStreamingEndpointSkuInfo; +import com.azure.resourcemanager.mediaservices.models.StreamingEndpointSkuInfoListResult; +import java.util.Collections; +import java.util.List; + +public final class StreamingEndpointSkuInfoListResultImpl implements StreamingEndpointSkuInfoListResult { + private StreamingEndpointSkuInfoListResultInner innerObject; + + private final com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager; + + StreamingEndpointSkuInfoListResultImpl( + StreamingEndpointSkuInfoListResultInner innerObject, + com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public StreamingEndpointSkuInfoListResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.mediaservices.MediaServicesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingEndpointsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingEndpointsClientImpl.java index 9ac0ad4ae1ecb..57e265da46192 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 @@ -36,6 +36,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.mediaservices.fluent.StreamingEndpointsClient; import com.azure.resourcemanager.mediaservices.fluent.models.StreamingEndpointInner; +import com.azure.resourcemanager.mediaservices.fluent.models.StreamingEndpointSkuInfoListResultInner; import com.azure.resourcemanager.mediaservices.models.StreamingEndpointListResult; import com.azure.resourcemanager.mediaservices.models.StreamingEntityScaleUnit; import java.nio.ByteBuffer; @@ -152,6 +153,22 @@ Mono>> delete( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices" + + "/{accountName}/streamingEndpoints/{streamingEndpointName}/skus") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> skus( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("streamingEndpointName") String streamingEndpointName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices" @@ -220,7 +237,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 along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -278,7 +295,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 along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -332,7 +349,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 as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String accountName) { @@ -349,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 as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String accountName, Context context) { @@ -366,7 +383,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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String accountName) { @@ -382,7 +399,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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String accountName, Context context) { @@ -398,7 +415,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 a streaming endpoint. + * @return a streaming endpoint along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -453,7 +470,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a streaming endpoint. + * @return a streaming endpoint along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -504,7 +521,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a streaming endpoint. + * @return a streaming endpoint on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -546,7 +563,7 @@ public StreamingEndpointInner get(String resourceGroupName, String accountName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a streaming endpoint. + * @return a streaming endpoint along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -565,7 +582,7 @@ public Response getWithResponse( * @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. + * @return the streaming endpoint along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -633,7 +650,7 @@ private Mono>> createWithResponseAsync( * @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. + * @return the streaming endpoint along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -698,9 +715,9 @@ private Mono>> createWithResponseAsync( * @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. + * @return the {@link PollerFlux} for polling of the streaming endpoint. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, StreamingEndpointInner> beginCreateAsync( String resourceGroupName, String accountName, @@ -716,7 +733,7 @@ private PollerFlux, StreamingEndpointInner> b this.client.getHttpPipeline(), StreamingEndpointInner.class, StreamingEndpointInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -731,9 +748,9 @@ private PollerFlux, StreamingEndpointInner> b * @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. + * @return the {@link PollerFlux} for polling of the streaming endpoint. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, StreamingEndpointInner> beginCreateAsync( String resourceGroupName, String accountName, @@ -766,9 +783,9 @@ private PollerFlux, StreamingEndpointInner> b * @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. + * @return the {@link SyncPoller} for polling of the streaming endpoint. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, StreamingEndpointInner> beginCreate( String resourceGroupName, String accountName, @@ -791,9 +808,9 @@ public SyncPoller, StreamingEndpointInner> be * @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. + * @return the {@link SyncPoller} for polling of the streaming endpoint. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, StreamingEndpointInner> beginCreate( String resourceGroupName, String accountName, @@ -816,7 +833,7 @@ public SyncPoller, StreamingEndpointInner> be * @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. + * @return the streaming endpoint on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -840,7 +857,7 @@ private Mono createAsync( * @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. + * @return the streaming endpoint on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -863,7 +880,7 @@ private Mono createAsync( * @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. + * @return the streaming endpoint on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -956,7 +973,7 @@ public StreamingEndpointInner create( * @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. + * @return the streaming endpoint along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -1018,7 +1035,7 @@ private Mono>> updateWithResponseAsync( * @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. + * @return the streaming endpoint along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -1080,9 +1097,9 @@ private Mono>> updateWithResponseAsync( * @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. + * @return the {@link PollerFlux} for polling of 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 = @@ -1094,7 +1111,7 @@ private PollerFlux, StreamingEndpointInner> b this.client.getHttpPipeline(), StreamingEndpointInner.class, StreamingEndpointInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -1108,9 +1125,9 @@ private PollerFlux, StreamingEndpointInner> b * @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. + * @return the {@link PollerFlux} for polling of the streaming endpoint. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, StreamingEndpointInner> beginUpdateAsync( String resourceGroupName, String accountName, @@ -1140,9 +1157,9 @@ private PollerFlux, StreamingEndpointInner> b * @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. + * @return the {@link SyncPoller} for polling of 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(); @@ -1159,9 +1176,9 @@ public SyncPoller, StreamingEndpointInner> be * @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. + * @return the {@link SyncPoller} for polling of the streaming endpoint. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, StreamingEndpointInner> beginUpdate( String resourceGroupName, String accountName, @@ -1182,7 +1199,7 @@ public SyncPoller, StreamingEndpointInner> be * @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. + * @return the streaming endpoint on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1203,7 +1220,7 @@ private Mono updateAsync( * @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. + * @return the streaming endpoint on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1267,7 +1284,7 @@ public StreamingEndpointInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1322,7 +1339,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1373,16 +1390,17 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String accountName, String streamingEndpointName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, accountName, streamingEndpointName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1395,9 +1413,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @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); @@ -1417,9 +1435,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @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(); @@ -1435,9 +1453,9 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @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(); @@ -1452,7 +1470,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String accountName, String streamingEndpointName) { @@ -1471,7 +1489,7 @@ private Mono deleteAsync(String resourceGroupName, String accountName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -1512,6 +1530,172 @@ public void delete(String resourceGroupName, String accountName, String streamin deleteAsync(resourceGroupName, accountName, streamingEndpointName, context).block(); } + /** + * List streaming endpoint supported skus. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingEndpointName The name of the streaming endpoint, maximum length is 24. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> skusWithResponseAsync( + String resourceGroupName, String accountName, String streamingEndpointName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (streamingEndpointName == null) { + return Mono + .error(new IllegalArgumentException("Parameter streamingEndpointName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .skus( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + streamingEndpointName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List streaming endpoint supported skus. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingEndpointName The name of the streaming endpoint, maximum length is 24. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> skusWithResponseAsync( + String resourceGroupName, String accountName, String streamingEndpointName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (streamingEndpointName == null) { + return Mono + .error(new IllegalArgumentException("Parameter streamingEndpointName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .skus( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + streamingEndpointName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * List streaming endpoint supported skus. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingEndpointName The name of the streaming endpoint, maximum length is 24. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono skusAsync( + String resourceGroupName, String accountName, String streamingEndpointName) { + return skusWithResponseAsync(resourceGroupName, accountName, streamingEndpointName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * List streaming endpoint supported skus. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingEndpointName The name of the streaming endpoint, maximum length is 24. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StreamingEndpointSkuInfoListResultInner skus( + String resourceGroupName, String accountName, String streamingEndpointName) { + return skusAsync(resourceGroupName, accountName, streamingEndpointName).block(); + } + + /** + * List streaming endpoint supported skus. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingEndpointName The name of the streaming endpoint, maximum length is 24. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response skusWithResponse( + String resourceGroupName, String accountName, String streamingEndpointName, Context context) { + return skusWithResponseAsync(resourceGroupName, accountName, streamingEndpointName, context).block(); + } + /** * Starts an existing streaming endpoint. * @@ -1521,7 +1705,7 @@ public void delete(String resourceGroupName, String accountName, String streamin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> startWithResponseAsync( @@ -1576,7 +1760,7 @@ private Mono>> startWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> startWithResponseAsync( @@ -1627,16 +1811,17 @@ private Mono>> startWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStartAsync( String resourceGroupName, String accountName, String streamingEndpointName) { Mono>> mono = startWithResponseAsync(resourceGroupName, accountName, streamingEndpointName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1649,9 +1834,9 @@ private PollerFlux, Void> beginStartAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @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); @@ -1671,9 +1856,9 @@ private PollerFlux, Void> beginStartAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @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(); @@ -1689,9 +1874,9 @@ public SyncPoller, Void> beginStart( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @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(); @@ -1706,7 +1891,7 @@ public SyncPoller, Void> beginStart( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono startAsync(String resourceGroupName, String accountName, String streamingEndpointName) { @@ -1725,7 +1910,7 @@ private Mono startAsync(String resourceGroupName, String accountName, 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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono startAsync( @@ -1775,7 +1960,7 @@ public void start(String resourceGroupName, String accountName, String streaming * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> stopWithResponseAsync( @@ -1830,7 +2015,7 @@ private Mono>> stopWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> stopWithResponseAsync( @@ -1881,16 +2066,17 @@ private Mono>> stopWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStopAsync( String resourceGroupName, String accountName, String streamingEndpointName) { Mono>> mono = stopWithResponseAsync(resourceGroupName, accountName, streamingEndpointName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1903,9 +2089,9 @@ private PollerFlux, Void> beginStopAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @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); @@ -1925,9 +2111,9 @@ private PollerFlux, Void> beginStopAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @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(); @@ -1943,9 +2129,9 @@ public SyncPoller, Void> beginStop( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @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(); @@ -1960,7 +2146,7 @@ public SyncPoller, Void> beginStop( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono stopAsync(String resourceGroupName, String accountName, String streamingEndpointName) { @@ -1979,7 +2165,7 @@ private Mono stopAsync(String resourceGroupName, String accountName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono stopAsync( @@ -2030,7 +2216,7 @@ public void stop(String resourceGroupName, String accountName, String streamingE * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> scaleWithResponseAsync( @@ -2095,7 +2281,7 @@ private Mono>> scaleWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> scaleWithResponseAsync( @@ -2157,9 +2343,9 @@ private Mono>> scaleWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginScaleAsync( String resourceGroupName, String accountName, @@ -2169,7 +2355,8 @@ private PollerFlux, Void> beginScaleAsync( scaleWithResponseAsync(resourceGroupName, accountName, streamingEndpointName, parameters); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -2183,9 +2370,9 @@ private PollerFlux, Void> beginScaleAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginScaleAsync( String resourceGroupName, String accountName, @@ -2210,9 +2397,9 @@ private PollerFlux, Void> beginScaleAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginScale( String resourceGroupName, String accountName, @@ -2232,9 +2419,9 @@ public SyncPoller, Void> beginScale( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginScale( String resourceGroupName, String accountName, @@ -2255,7 +2442,7 @@ public SyncPoller, Void> beginScale( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono scaleAsync( @@ -2279,7 +2466,7 @@ private Mono scaleAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono scaleAsync( @@ -2342,7 +2529,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 along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -2378,7 +2565,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 along with {@link PagedResponse} on successful completion of {@link Mono}. */ @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/StreamingEndpointsImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingEndpointsImpl.java index 0ebf940a62981..d4bc3556e7249 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingEndpointsImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingEndpointsImpl.java @@ -11,7 +11,9 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mediaservices.fluent.StreamingEndpointsClient; import com.azure.resourcemanager.mediaservices.fluent.models.StreamingEndpointInner; +import com.azure.resourcemanager.mediaservices.fluent.models.StreamingEndpointSkuInfoListResultInner; import com.azure.resourcemanager.mediaservices.models.StreamingEndpoint; +import com.azure.resourcemanager.mediaservices.models.StreamingEndpointSkuInfoListResult; import com.azure.resourcemanager.mediaservices.models.StreamingEndpoints; import com.azure.resourcemanager.mediaservices.models.StreamingEntityScaleUnit; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -73,6 +75,32 @@ public void delete(String resourceGroupName, String accountName, String streamin this.serviceClient().delete(resourceGroupName, accountName, streamingEndpointName, context); } + public StreamingEndpointSkuInfoListResult skus( + String resourceGroupName, String accountName, String streamingEndpointName) { + StreamingEndpointSkuInfoListResultInner inner = + this.serviceClient().skus(resourceGroupName, accountName, streamingEndpointName); + if (inner != null) { + return new StreamingEndpointSkuInfoListResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response skusWithResponse( + String resourceGroupName, String accountName, String streamingEndpointName, Context context) { + Response inner = + this.serviceClient().skusWithResponse(resourceGroupName, accountName, streamingEndpointName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new StreamingEndpointSkuInfoListResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + public void start(String resourceGroupName, String accountName, String streamingEndpointName) { this.serviceClient().start(resourceGroupName, accountName, streamingEndpointName); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingLocatorsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingLocatorsClientImpl.java index 6dd8c6b5ae752..d671e3652d2bc 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingLocatorsClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingLocatorsClientImpl.java @@ -187,7 +187,8 @@ 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 a collection of StreamingLocator items. + * @return a collection of StreamingLocator items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -252,7 +253,8 @@ 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 a collection of StreamingLocator items. + * @return a collection of StreamingLocator items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -313,7 +315,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 a collection of StreamingLocator items. + * @return a collection of StreamingLocator items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -331,7 +333,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 a collection of StreamingLocator items. + * @return a collection of StreamingLocator items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String accountName) { @@ -356,7 +358,7 @@ private PagedFlux listAsync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of StreamingLocator items. + * @return a collection of StreamingLocator items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -374,7 +376,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 a collection of StreamingLocator items. + * @return a collection of StreamingLocator items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String accountName) { @@ -397,7 +399,7 @@ public PagedIterable list(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of StreamingLocator items. + * @return a collection of StreamingLocator items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -414,7 +416,8 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Streaming Locator in the Media Services account. + * @return the details of a Streaming Locator in the Media Services account along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -469,7 +472,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Streaming Locator in the Media Services account. + * @return the details of a Streaming Locator in the Media Services account along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -520,7 +524,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Streaming Locator in the Media Services account. + * @return the details of a Streaming Locator in the Media Services account on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -562,7 +567,7 @@ public StreamingLocatorInner get(String resourceGroupName, String accountName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Streaming Locator in the Media Services account. + * @return the details of a Streaming Locator in the Media Services account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -580,7 +585,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Streaming Locator resource. + * @return a Streaming Locator resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createWithResponseAsync( @@ -642,7 +647,7 @@ private Mono> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Streaming Locator resource. + * @return a Streaming Locator resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createWithResponseAsync( @@ -704,7 +709,7 @@ private Mono> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Streaming Locator resource. + * @return a Streaming Locator resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -749,7 +754,7 @@ public StreamingLocatorInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Streaming Locator resource. + * @return a Streaming Locator resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createWithResponse( @@ -771,7 +776,7 @@ public Response createWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -826,7 +831,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -877,7 +882,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String accountName, String streamingLocatorName) { @@ -910,7 +915,7 @@ public void delete(String resourceGroupName, String accountName, String streamin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse( @@ -927,7 +932,8 @@ public Response deleteWithResponse( * @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 class of response for listContentKeys action. + * @return class of response for listContentKeys action along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listContentKeysWithResponseAsync( @@ -982,7 +988,8 @@ private Mono> listContentKeysWithResponse * @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 class of response for listContentKeys action. + * @return class of response for listContentKeys action along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listContentKeysWithResponseAsync( @@ -1033,7 +1040,7 @@ private Mono> listContentKeysWithResponse * @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 class of response for listContentKeys action. + * @return class of response for listContentKeys action on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listContentKeysAsync( @@ -1076,7 +1083,7 @@ public ListContentKeysResponseInner listContentKeys( * @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 class of response for listContentKeys action. + * @return class of response for listContentKeys action along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listContentKeysWithResponse( @@ -1093,7 +1100,8 @@ public Response listContentKeysWithResponse( * @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 class of response for listPaths action. + * @return class of response for listPaths action along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listPathsWithResponseAsync( @@ -1148,7 +1156,8 @@ private Mono> listPathsWithResponseAsync( * @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 class of response for listPaths action. + * @return class of response for listPaths action along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listPathsWithResponseAsync( @@ -1199,7 +1208,7 @@ private Mono> listPathsWithResponseAsync( * @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 class of response for listPaths action. + * @return class of response for listPaths action on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listPathsAsync( @@ -1241,7 +1250,7 @@ public ListPathsResponseInner listPaths(String resourceGroupName, String account * @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 class of response for listPaths action. + * @return class of response for listPaths action along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listPathsWithResponse( @@ -1256,7 +1265,8 @@ public Response listPathsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of StreamingLocator items. + * @return a collection of StreamingLocator items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1292,7 +1302,8 @@ private Mono> listNextSinglePageAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of StreamingLocator items. + * @return a collection of StreamingLocator items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @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/StreamingLocatorsImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingLocatorsImpl.java index 04b8843f556f2..b9f5b83b4f9f8 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingLocatorsImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingLocatorsImpl.java @@ -212,7 +212,7 @@ public void deleteById(String id) { .format( "The resource ID '%s' is not valid. Missing path segment 'streamingLocators'.", id))); } - this.deleteWithResponse(resourceGroupName, accountName, streamingLocatorName, Context.NONE).getValue(); + this.deleteWithResponse(resourceGroupName, accountName, streamingLocatorName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingPoliciesClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingPoliciesClientImpl.java index 9659b88cf3a9d..0129b7b78668e 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingPoliciesClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingPoliciesClientImpl.java @@ -152,7 +152,8 @@ 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 a collection of StreamingPolicy items. + * @return a collection of StreamingPolicy items along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -217,7 +218,8 @@ 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 a collection of StreamingPolicy items. + * @return a collection of StreamingPolicy items along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -278,7 +280,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 a collection of StreamingPolicy items. + * @return a collection of StreamingPolicy items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -296,7 +298,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 a collection of StreamingPolicy items. + * @return a collection of StreamingPolicy items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String accountName) { @@ -321,7 +323,7 @@ private PagedFlux listAsync(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 a collection of StreamingPolicy items. + * @return a collection of StreamingPolicy items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -339,7 +341,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 a collection of StreamingPolicy items. + * @return a collection of StreamingPolicy items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String accountName) { @@ -362,7 +364,7 @@ public PagedIterable list(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of StreamingPolicy items. + * @return a collection of StreamingPolicy items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -379,7 +381,8 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Streaming Policy in the Media Services account. + * @return the details of a Streaming Policy in the Media Services account along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -434,7 +437,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Streaming Policy in the Media Services account. + * @return the details of a Streaming Policy in the Media Services account along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -485,7 +489,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Streaming Policy in the Media Services account. + * @return the details of a Streaming Policy in the Media Services account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -527,7 +531,7 @@ public StreamingPolicyInner get(String resourceGroupName, String accountName, 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 details of a Streaming Policy in the Media Services account. + * @return the details of a Streaming Policy in the Media Services account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -545,7 +549,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Streaming Policy resource. + * @return a Streaming Policy resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createWithResponseAsync( @@ -607,7 +611,7 @@ private Mono> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Streaming Policy resource. + * @return a Streaming Policy resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createWithResponseAsync( @@ -669,7 +673,7 @@ private Mono> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Streaming Policy resource. + * @return a Streaming Policy resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -714,7 +718,7 @@ public StreamingPolicyInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Streaming Policy resource. + * @return a Streaming Policy resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createWithResponse( @@ -736,7 +740,7 @@ public Response createWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -791,7 +795,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -842,7 +846,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String accountName, String streamingPolicyName) { @@ -875,7 +879,7 @@ public void delete(String resourceGroupName, String accountName, String streamin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse( @@ -890,7 +894,8 @@ public Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of StreamingPolicy items. + * @return a collection of StreamingPolicy items along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -926,7 +931,8 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of StreamingPolicy items. + * @return a collection of StreamingPolicy items along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @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/StreamingPoliciesImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingPoliciesImpl.java index d5ff451a74fb3..632aedddd7fab 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingPoliciesImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingPoliciesImpl.java @@ -155,7 +155,7 @@ public void deleteById(String id) { .format( "The resource ID '%s' is not valid. Missing path segment 'streamingPolicies'.", id))); } - this.deleteWithResponse(resourceGroupName, accountName, streamingPolicyName, Context.NONE).getValue(); + this.deleteWithResponse(resourceGroupName, accountName, streamingPolicyName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TracksClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TracksClientImpl.java new file mode 100644 index 0000000000000..3ce1828fd907c --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TracksClientImpl.java @@ -0,0 +1,1766 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.mediaservices.fluent.TracksClient; +import com.azure.resourcemanager.mediaservices.fluent.models.AssetTrackInner; +import com.azure.resourcemanager.mediaservices.models.AssetTrackCollection; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in TracksClient. */ +public final class TracksClientImpl implements TracksClient { + private final ClientLogger logger = new ClientLogger(TracksClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final TracksService service; + + /** The service client containing this operation class. */ + private final AzureMediaServicesImpl client; + + /** + * Initializes an instance of TracksClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + TracksClientImpl(AzureMediaServicesImpl client) { + this.service = RestProxy.create(TracksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMediaServicesTracks to be used by the proxy service to perform + * REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMediaServicesTr") + private interface TracksService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices" + + "/{accountName}/assets/{assetName}/tracks") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("assetName") String assetName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices" + + "/{accountName}/assets/{assetName}/tracks/{trackName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("assetName") String assetName, + @PathParam("trackName") String trackName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices" + + "/{accountName}/assets/{assetName}/tracks/{trackName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("assetName") String assetName, + @PathParam("trackName") String trackName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AssetTrackInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices" + + "/{accountName}/assets/{assetName}/tracks/{trackName}") + @ExpectedResponses({202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("assetName") String assetName, + @PathParam("trackName") String trackName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices" + + "/{accountName}/assets/{assetName}/tracks/{trackName}") + @ExpectedResponses({202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("assetName") String assetName, + @PathParam("trackName") String trackName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AssetTrackInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices" + + "/{accountName}/assets/{assetName}/tracks/{trackName}/updateTrackData") + @ExpectedResponses({202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateTrackData( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("assetName") String assetName, + @PathParam("trackName") String trackName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Lists the Tracks in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of AssetTrack items along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String accountName, String assetName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (assetName == null) { + return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + assetName, + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists the Tracks in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of AssetTrack items along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String accountName, String assetName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (assetName == null) { + return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + assetName, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + } + + /** + * Lists the Tracks in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of AssetTrack items as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String accountName, String assetName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, assetName)); + } + + /** + * Lists the Tracks in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of AssetTrack items as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String accountName, String assetName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, assetName, context)); + } + + /** + * Lists the Tracks in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of AssetTrack items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String accountName, String assetName) { + return new PagedIterable<>(listAsync(resourceGroupName, accountName, assetName)); + } + + /** + * Lists the Tracks in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of AssetTrack items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String accountName, String assetName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, accountName, assetName, context)); + } + + /** + * Get the details of a Track in the Asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of a Track in the Asset along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String accountName, String assetName, String trackName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (assetName == null) { + return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null.")); + } + if (trackName == null) { + return Mono.error(new IllegalArgumentException("Parameter trackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + assetName, + trackName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the details of a Track in the Asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of a Track in the Asset along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String accountName, String assetName, String trackName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (assetName == null) { + return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null.")); + } + if (trackName == null) { + return Mono.error(new IllegalArgumentException("Parameter trackName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + assetName, + trackName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get the details of a Track in the Asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of a Track in the Asset on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String accountName, String assetName, String trackName) { + return getWithResponseAsync(resourceGroupName, accountName, assetName, trackName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get the details of a Track in the Asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of a Track in the Asset. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AssetTrackInner get(String resourceGroupName, String accountName, String assetName, String trackName) { + return getAsync(resourceGroupName, accountName, assetName, trackName).block(); + } + + /** + * Get the details of a Track in the Asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of a Track in the Asset along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String accountName, String assetName, String trackName, Context context) { + return getWithResponseAsync(resourceGroupName, accountName, assetName, trackName, context).block(); + } + + /** + * Create or update a Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Asset Track resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String accountName, String assetName, String trackName, AssetTrackInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (assetName == null) { + return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null.")); + } + if (trackName == null) { + return Mono.error(new IllegalArgumentException("Parameter trackName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + assetName, + trackName, + this.client.getApiVersion(), + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update a Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Asset Track resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String accountName, + String assetName, + String trackName, + AssetTrackInner parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (assetName == null) { + return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null.")); + } + if (trackName == null) { + return Mono.error(new IllegalArgumentException("Parameter trackName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + assetName, + trackName, + this.client.getApiVersion(), + parameters, + accept, + context); + } + + /** + * Create or update a Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of an Asset Track resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AssetTrackInner> beginCreateOrUpdateAsync( + String resourceGroupName, String accountName, String assetName, String trackName, AssetTrackInner parameters) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, accountName, assetName, trackName, parameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AssetTrackInner.class, + AssetTrackInner.class, + this.client.getContext()); + } + + /** + * Create or update a Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of an Asset Track resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AssetTrackInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String accountName, + String assetName, + String trackName, + AssetTrackInner parameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, accountName, assetName, trackName, parameters, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), AssetTrackInner.class, AssetTrackInner.class, context); + } + + /** + * Create or update a Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an Asset Track resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AssetTrackInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String assetName, String trackName, AssetTrackInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, assetName, trackName, parameters) + .getSyncPoller(); + } + + /** + * Create or update a Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an Asset Track resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AssetTrackInner> beginCreateOrUpdate( + String resourceGroupName, + String accountName, + String assetName, + String trackName, + AssetTrackInner parameters, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, assetName, trackName, parameters, context) + .getSyncPoller(); + } + + /** + * Create or update a Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Asset Track resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String accountName, String assetName, String trackName, AssetTrackInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, assetName, trackName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Asset Track resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String accountName, + String assetName, + String trackName, + AssetTrackInner parameters, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, assetName, trackName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Asset Track resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AssetTrackInner createOrUpdate( + String resourceGroupName, String accountName, String assetName, String trackName, AssetTrackInner parameters) { + return createOrUpdateAsync(resourceGroupName, accountName, assetName, trackName, parameters).block(); + } + + /** + * Create or update a Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Asset Track resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AssetTrackInner createOrUpdate( + String resourceGroupName, + String accountName, + String assetName, + String trackName, + AssetTrackInner parameters, + Context context) { + return createOrUpdateAsync(resourceGroupName, accountName, assetName, trackName, parameters, context).block(); + } + + /** + * Deletes a Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String accountName, String assetName, String trackName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (assetName == null) { + return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null.")); + } + if (trackName == null) { + return Mono.error(new IllegalArgumentException("Parameter trackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + assetName, + trackName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String accountName, String assetName, String trackName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (assetName == null) { + return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null.")); + } + if (trackName == null) { + return Mono.error(new IllegalArgumentException("Parameter trackName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + assetName, + trackName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Deletes a Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String accountName, String assetName, String trackName) { + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, accountName, assetName, trackName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Deletes a Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String accountName, String assetName, String trackName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, accountName, assetName, trackName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Deletes a Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String accountName, String assetName, String trackName) { + return beginDeleteAsync(resourceGroupName, accountName, assetName, trackName).getSyncPoller(); + } + + /** + * Deletes a Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String accountName, String assetName, String trackName, Context context) { + return beginDeleteAsync(resourceGroupName, accountName, assetName, trackName, context).getSyncPoller(); + } + + /** + * Deletes a Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String accountName, String assetName, String trackName) { + return beginDeleteAsync(resourceGroupName, accountName, assetName, trackName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, String accountName, String assetName, String trackName, Context context) { + return beginDeleteAsync(resourceGroupName, accountName, assetName, trackName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String assetName, String trackName) { + deleteAsync(resourceGroupName, accountName, assetName, trackName).block(); + } + + /** + * Deletes a Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete( + String resourceGroupName, String accountName, String assetName, String trackName, Context context) { + deleteAsync(resourceGroupName, accountName, assetName, trackName, context).block(); + } + + /** + * Updates an existing Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Asset Track resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, String accountName, String assetName, String trackName, AssetTrackInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (assetName == null) { + return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null.")); + } + if (trackName == null) { + return Mono.error(new IllegalArgumentException("Parameter trackName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + assetName, + trackName, + this.client.getApiVersion(), + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates an existing Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Asset Track resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, + String accountName, + String assetName, + String trackName, + AssetTrackInner parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (assetName == null) { + return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null.")); + } + if (trackName == null) { + return Mono.error(new IllegalArgumentException("Parameter trackName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + assetName, + trackName, + this.client.getApiVersion(), + parameters, + accept, + context); + } + + /** + * Updates an existing Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of an Asset Track resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AssetTrackInner> beginUpdateAsync( + String resourceGroupName, String accountName, String assetName, String trackName, AssetTrackInner parameters) { + Mono>> mono = + updateWithResponseAsync(resourceGroupName, accountName, assetName, trackName, parameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AssetTrackInner.class, + AssetTrackInner.class, + this.client.getContext()); + } + + /** + * Updates an existing Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of an Asset Track resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AssetTrackInner> beginUpdateAsync( + String resourceGroupName, + String accountName, + String assetName, + String trackName, + AssetTrackInner parameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateWithResponseAsync(resourceGroupName, accountName, assetName, trackName, parameters, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), AssetTrackInner.class, AssetTrackInner.class, context); + } + + /** + * Updates an existing Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an Asset Track resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AssetTrackInner> beginUpdate( + String resourceGroupName, String accountName, String assetName, String trackName, AssetTrackInner parameters) { + return beginUpdateAsync(resourceGroupName, accountName, assetName, trackName, parameters).getSyncPoller(); + } + + /** + * Updates an existing Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an Asset Track resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AssetTrackInner> beginUpdate( + String resourceGroupName, + String accountName, + String assetName, + String trackName, + AssetTrackInner parameters, + Context context) { + return beginUpdateAsync(resourceGroupName, accountName, assetName, trackName, parameters, context) + .getSyncPoller(); + } + + /** + * Updates an existing Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Asset Track resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String accountName, String assetName, String trackName, AssetTrackInner parameters) { + return beginUpdateAsync(resourceGroupName, accountName, assetName, trackName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates an existing Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Asset Track resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, + String accountName, + String assetName, + String trackName, + AssetTrackInner parameters, + Context context) { + return beginUpdateAsync(resourceGroupName, accountName, assetName, trackName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates an existing Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Asset Track resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AssetTrackInner update( + String resourceGroupName, String accountName, String assetName, String trackName, AssetTrackInner parameters) { + return updateAsync(resourceGroupName, accountName, assetName, trackName, parameters).block(); + } + + /** + * Updates an existing Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Asset Track resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AssetTrackInner update( + String resourceGroupName, + String accountName, + String assetName, + String trackName, + AssetTrackInner parameters, + Context context) { + return updateAsync(resourceGroupName, accountName, assetName, trackName, parameters, context).block(); + } + + /** + * Update the track data. Call this API after any changes are made to the track data stored in the asset container. + * For example, you have modified the WebVTT captions file in the Azure blob storage container for the asset, + * viewers will not see the new version of the captions unless this API is called. Note, the changes may not be + * reflected immediately. CDN cache may also need to be purged if applicable. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateTrackDataWithResponseAsync( + String resourceGroupName, String accountName, String assetName, String trackName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (assetName == null) { + return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null.")); + } + if (trackName == null) { + return Mono.error(new IllegalArgumentException("Parameter trackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateTrackData( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + assetName, + trackName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update the track data. Call this API after any changes are made to the track data stored in the asset container. + * For example, you have modified the WebVTT captions file in the Azure blob storage container for the asset, + * viewers will not see the new version of the captions unless this API is called. Note, the changes may not be + * reflected immediately. CDN cache may also need to be purged if applicable. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateTrackDataWithResponseAsync( + String resourceGroupName, String accountName, String assetName, String trackName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (assetName == null) { + return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null.")); + } + if (trackName == null) { + return Mono.error(new IllegalArgumentException("Parameter trackName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateTrackData( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + assetName, + trackName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Update the track data. Call this API after any changes are made to the track data stored in the asset container. + * For example, you have modified the WebVTT captions file in the Azure blob storage container for the asset, + * viewers will not see the new version of the captions unless this API is called. Note, the changes may not be + * reflected immediately. CDN cache may also need to be purged if applicable. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginUpdateTrackDataAsync( + String resourceGroupName, String accountName, String assetName, String trackName) { + Mono>> mono = + updateTrackDataWithResponseAsync(resourceGroupName, accountName, assetName, trackName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Update the track data. Call this API after any changes are made to the track data stored in the asset container. + * For example, you have modified the WebVTT captions file in the Azure blob storage container for the asset, + * viewers will not see the new version of the captions unless this API is called. Note, the changes may not be + * reflected immediately. CDN cache may also need to be purged if applicable. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginUpdateTrackDataAsync( + String resourceGroupName, String accountName, String assetName, String trackName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateTrackDataWithResponseAsync(resourceGroupName, accountName, assetName, trackName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Update the track data. Call this API after any changes are made to the track data stored in the asset container. + * For example, you have modified the WebVTT captions file in the Azure blob storage container for the asset, + * viewers will not see the new version of the captions unless this API is called. Note, the changes may not be + * reflected immediately. CDN cache may also need to be purged if applicable. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginUpdateTrackData( + String resourceGroupName, String accountName, String assetName, String trackName) { + return beginUpdateTrackDataAsync(resourceGroupName, accountName, assetName, trackName).getSyncPoller(); + } + + /** + * Update the track data. Call this API after any changes are made to the track data stored in the asset container. + * For example, you have modified the WebVTT captions file in the Azure blob storage container for the asset, + * viewers will not see the new version of the captions unless this API is called. Note, the changes may not be + * reflected immediately. CDN cache may also need to be purged if applicable. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginUpdateTrackData( + String resourceGroupName, String accountName, String assetName, String trackName, Context context) { + return beginUpdateTrackDataAsync(resourceGroupName, accountName, assetName, trackName, context).getSyncPoller(); + } + + /** + * Update the track data. Call this API after any changes are made to the track data stored in the asset container. + * For example, you have modified the WebVTT captions file in the Azure blob storage container for the asset, + * viewers will not see the new version of the captions unless this API is called. Note, the changes may not be + * reflected immediately. CDN cache may also need to be purged if applicable. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateTrackDataAsync( + String resourceGroupName, String accountName, String assetName, String trackName) { + return beginUpdateTrackDataAsync(resourceGroupName, accountName, assetName, trackName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update the track data. Call this API after any changes are made to the track data stored in the asset container. + * For example, you have modified the WebVTT captions file in the Azure blob storage container for the asset, + * viewers will not see the new version of the captions unless this API is called. Note, the changes may not be + * reflected immediately. CDN cache may also need to be purged if applicable. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateTrackDataAsync( + String resourceGroupName, String accountName, String assetName, String trackName, Context context) { + return beginUpdateTrackDataAsync(resourceGroupName, accountName, assetName, trackName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update the track data. Call this API after any changes are made to the track data stored in the asset container. + * For example, you have modified the WebVTT captions file in the Azure blob storage container for the asset, + * viewers will not see the new version of the captions unless this API is called. Note, the changes may not be + * reflected immediately. CDN cache may also need to be purged if applicable. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void updateTrackData(String resourceGroupName, String accountName, String assetName, String trackName) { + updateTrackDataAsync(resourceGroupName, accountName, assetName, trackName).block(); + } + + /** + * Update the track data. Call this API after any changes are made to the track data stored in the asset container. + * For example, you have modified the WebVTT captions file in the Azure blob storage container for the asset, + * viewers will not see the new version of the captions unless this API is called. Note, the changes may not be + * reflected immediately. CDN cache may also need to be purged if applicable. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void updateTrackData( + String resourceGroupName, String accountName, String assetName, String trackName, Context context) { + updateTrackDataAsync(resourceGroupName, accountName, assetName, trackName, context).block(); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TracksImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TracksImpl.java new file mode 100644 index 0000000000000..6e7c8bab80e0a --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TracksImpl.java @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mediaservices.fluent.TracksClient; +import com.azure.resourcemanager.mediaservices.fluent.models.AssetTrackInner; +import com.azure.resourcemanager.mediaservices.models.AssetTrack; +import com.azure.resourcemanager.mediaservices.models.Tracks; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class TracksImpl implements Tracks { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TracksImpl.class); + + private final TracksClient innerClient; + + private final com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager; + + public TracksImpl( + TracksClient innerClient, com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String accountName, String assetName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName, assetName); + return Utils.mapPage(inner, inner1 -> new AssetTrackImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, String accountName, String assetName, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, accountName, assetName, context); + return Utils.mapPage(inner, inner1 -> new AssetTrackImpl(inner1, this.manager())); + } + + public AssetTrack get(String resourceGroupName, String accountName, String assetName, String trackName) { + AssetTrackInner inner = this.serviceClient().get(resourceGroupName, accountName, assetName, trackName); + if (inner != null) { + return new AssetTrackImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String resourceGroupName, String accountName, String assetName, String trackName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, accountName, assetName, trackName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new AssetTrackImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String accountName, String assetName, String trackName) { + this.serviceClient().delete(resourceGroupName, accountName, assetName, trackName); + } + + public void delete( + String resourceGroupName, String accountName, String assetName, String trackName, Context context) { + this.serviceClient().delete(resourceGroupName, accountName, assetName, trackName, context); + } + + public void updateTrackData(String resourceGroupName, String accountName, String assetName, String trackName) { + this.serviceClient().updateTrackData(resourceGroupName, accountName, assetName, trackName); + } + + public void updateTrackData( + String resourceGroupName, String accountName, String assetName, String trackName, Context context) { + this.serviceClient().updateTrackData(resourceGroupName, accountName, assetName, trackName, context); + } + + public AssetTrack getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = Utils.getValueFromIdByName(id, "mediaServices"); + if (accountName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'mediaServices'.", id))); + } + String assetName = Utils.getValueFromIdByName(id, "assets"); + if (assetName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'assets'.", id))); + } + String trackName = Utils.getValueFromIdByName(id, "tracks"); + if (trackName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'tracks'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, assetName, trackName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = Utils.getValueFromIdByName(id, "mediaServices"); + if (accountName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'mediaServices'.", id))); + } + String assetName = Utils.getValueFromIdByName(id, "assets"); + if (assetName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'assets'.", id))); + } + String trackName = Utils.getValueFromIdByName(id, "tracks"); + if (trackName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'tracks'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, assetName, trackName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = Utils.getValueFromIdByName(id, "mediaServices"); + if (accountName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'mediaServices'.", id))); + } + String assetName = Utils.getValueFromIdByName(id, "assets"); + if (assetName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'assets'.", id))); + } + String trackName = Utils.getValueFromIdByName(id, "tracks"); + if (trackName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'tracks'.", id))); + } + this.delete(resourceGroupName, accountName, assetName, trackName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = Utils.getValueFromIdByName(id, "mediaServices"); + if (accountName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'mediaServices'.", id))); + } + String assetName = Utils.getValueFromIdByName(id, "assets"); + if (assetName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'assets'.", id))); + } + String trackName = Utils.getValueFromIdByName(id, "tracks"); + if (trackName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'tracks'.", id))); + } + this.delete(resourceGroupName, accountName, assetName, trackName, context); + } + + private TracksClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.mediaservices.MediaServicesManager manager() { + return this.serviceManager; + } + + public AssetTrackImpl define(String name) { + return new AssetTrackImpl(name, this.manager()); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TransformsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TransformsClientImpl.java index e41fb3c8803c3..de1c840d59943 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TransformsClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TransformsClientImpl.java @@ -167,7 +167,8 @@ 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 a collection of Transform items. + * @return a collection of Transform items along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -229,7 +230,8 @@ 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 a collection of Transform items. + * @return a collection of Transform items along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -287,7 +289,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 a collection of Transform items. + * @return a collection of Transform items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -305,7 +307,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 a collection of Transform items. + * @return a collection of Transform items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String accountName) { @@ -327,7 +329,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 a collection of Transform items. + * @return a collection of Transform items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -345,7 +347,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 a collection of Transform items. + * @return a collection of Transform items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String accountName) { @@ -365,7 +367,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 a collection of Transform items. + * @return a collection of Transform items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -382,7 +384,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Transform. + * @return a Transform along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -436,7 +438,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Transform. + * @return a Transform along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -486,7 +488,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Transform. + * @return a Transform on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String accountName, String transformName) { @@ -527,7 +529,7 @@ public TransformInner get(String resourceGroupName, String accountName, String t * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Transform. + * @return a Transform along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -546,7 +548,8 @@ public Response getWithResponse( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Transform encapsulates the rules or instructions for generating desired outputs from input media, such - * as by transcoding or by extracting insights. + * as by transcoding or by extracting insights along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -608,7 +611,8 @@ private Mono> createOrUpdateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Transform encapsulates the rules or instructions for generating desired outputs from input media, such - * as by transcoding or by extracting insights. + * as by transcoding or by extracting insights along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -670,7 +674,7 @@ private Mono> createOrUpdateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Transform encapsulates the rules or instructions for generating desired outputs from input media, such - * as by transcoding or by extracting insights. + * as by transcoding or by extracting insights on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -717,7 +721,7 @@ public TransformInner createOrUpdate( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Transform encapsulates the rules or instructions for generating desired outputs from input media, such - * as by transcoding or by extracting insights. + * as by transcoding or by extracting insights along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( @@ -739,7 +743,7 @@ public Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -793,7 +797,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -843,7 +847,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String accountName, String transformName) { @@ -876,7 +880,7 @@ public void delete(String resourceGroupName, String accountName, String transfor * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse( @@ -895,7 +899,8 @@ public Response deleteWithResponse( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Transform encapsulates the rules or instructions for generating desired outputs from input media, such - * as by transcoding or by extracting insights. + * as by transcoding or by extracting insights along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -957,7 +962,8 @@ private Mono> updateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Transform encapsulates the rules or instructions for generating desired outputs from input media, such - * as by transcoding or by extracting insights. + * as by transcoding or by extracting insights along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1019,7 +1025,7 @@ private Mono> updateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Transform encapsulates the rules or instructions for generating desired outputs from input media, such - * as by transcoding or by extracting insights. + * as by transcoding or by extracting insights on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1066,7 +1072,7 @@ public TransformInner update( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Transform encapsulates the rules or instructions for generating desired outputs from input media, such - * as by transcoding or by extracting insights. + * as by transcoding or by extracting insights along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -1085,7 +1091,8 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of Transform items. + * @return a collection of Transform items along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1121,7 +1128,8 @@ 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 a collection of Transform items. + * @return a collection of Transform items along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @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/TransformsImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TransformsImpl.java index 1f35bcf6877a3..8dc56bc168009 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TransformsImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TransformsImpl.java @@ -148,7 +148,7 @@ public void deleteById(String id) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'transforms'.", id))); } - this.deleteWithResponse(resourceGroupName, accountName, transformName, Context.NONE).getValue(); + this.deleteWithResponse(resourceGroupName, accountName, transformName, Context.NONE); } public Response deleteByIdWithResponse(String id, 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 3d1849b019f34..d500ce1567534 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 7ef886029bf95..8583ff929dbe1 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/AccountFilters.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AccountFilters.java index f4f3f225c58da..1b787faf16e4c 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AccountFilters.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AccountFilters.java @@ -18,7 +18,7 @@ public interface AccountFilters { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of AccountFilter items. + * @return a collection of AccountFilter items as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String accountName); @@ -31,7 +31,7 @@ public interface AccountFilters { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of AccountFilter items. + * @return a collection of AccountFilter items as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String accountName, Context context); @@ -58,7 +58,7 @@ public interface AccountFilters { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Account Filter in the Media Services account. + * @return the details of an Account Filter in the Media Services account along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String accountName, String filterName, Context context); @@ -85,7 +85,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse(String resourceGroupName, String accountName, String filterName, Context context); @@ -96,7 +96,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Account Filter in the Media Services account. + * @return the details of an Account Filter in the Media Services account along with {@link Response}. */ AccountFilter getById(String id); @@ -108,7 +108,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Account Filter in the Media Services account. + * @return the details of an Account Filter in the Media Services account along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); @@ -130,7 +130,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ArmStreamingEndpointCapacity.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ArmStreamingEndpointCapacity.java new file mode 100644 index 0000000000000..3a37a98ea1f8a --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ArmStreamingEndpointCapacity.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The streaming endpoint sku capacity. */ +@Fluent +public final class ArmStreamingEndpointCapacity { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ArmStreamingEndpointCapacity.class); + + /* + * The scaleType property. + */ + @JsonProperty(value = "scaleType", access = JsonProperty.Access.WRITE_ONLY) + private String scaleType; + + /* + * The streaming endpoint default capacity. + */ + @JsonProperty(value = "default") + private Integer defaultProperty; + + /* + * The streaming endpoint minimum capacity. + */ + @JsonProperty(value = "minimum") + private Integer minimum; + + /* + * The streaming endpoint maximum capacity. + */ + @JsonProperty(value = "maximum") + private Integer maximum; + + /** + * Get the scaleType property: The scaleType property. + * + * @return the scaleType value. + */ + public String scaleType() { + return this.scaleType; + } + + /** + * Get the defaultProperty property: The streaming endpoint default capacity. + * + * @return the defaultProperty value. + */ + public Integer defaultProperty() { + return this.defaultProperty; + } + + /** + * Set the defaultProperty property: The streaming endpoint default capacity. + * + * @param defaultProperty the defaultProperty value to set. + * @return the ArmStreamingEndpointCapacity object itself. + */ + public ArmStreamingEndpointCapacity withDefaultProperty(Integer defaultProperty) { + this.defaultProperty = defaultProperty; + return this; + } + + /** + * Get the minimum property: The streaming endpoint minimum capacity. + * + * @return the minimum value. + */ + public Integer minimum() { + return this.minimum; + } + + /** + * Set the minimum property: The streaming endpoint minimum capacity. + * + * @param minimum the minimum value to set. + * @return the ArmStreamingEndpointCapacity object itself. + */ + public ArmStreamingEndpointCapacity withMinimum(Integer minimum) { + this.minimum = minimum; + return this; + } + + /** + * Get the maximum property: The streaming endpoint maximum capacity. + * + * @return the maximum value. + */ + public Integer maximum() { + return this.maximum; + } + + /** + * Set the maximum property: The streaming endpoint maximum capacity. + * + * @param maximum the maximum value to set. + * @return the ArmStreamingEndpointCapacity object itself. + */ + public ArmStreamingEndpointCapacity withMaximum(Integer maximum) { + this.maximum = maximum; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ArmStreamingEndpointCurrentSku.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ArmStreamingEndpointCurrentSku.java new file mode 100644 index 0000000000000..598282eb71ee8 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ArmStreamingEndpointCurrentSku.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The streaming endpoint current sku. */ +@Fluent +public final class ArmStreamingEndpointCurrentSku { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ArmStreamingEndpointCurrentSku.class); + + /* + * The streaming endpoint sku name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * The streaming endpoint sku capacity. + */ + @JsonProperty(value = "capacity") + private Integer capacity; + + /** + * Get the name property: The streaming endpoint sku name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the capacity property: The streaming endpoint sku capacity. + * + * @return the capacity value. + */ + public Integer capacity() { + return this.capacity; + } + + /** + * Set the capacity property: The streaming endpoint sku capacity. + * + * @param capacity the capacity value to set. + * @return the ArmStreamingEndpointCurrentSku object itself. + */ + public ArmStreamingEndpointCurrentSku withCapacity(Integer capacity) { + this.capacity = capacity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ArmStreamingEndpointSku.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ArmStreamingEndpointSku.java new file mode 100644 index 0000000000000..9af5cfe709f1f --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ArmStreamingEndpointSku.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The streaming endpoint sku. */ +@Immutable +public final class ArmStreamingEndpointSku { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ArmStreamingEndpointSku.class); + + /* + * The streaming endpoint sku name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * Get the name property: The streaming endpoint sku name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ArmStreamingEndpointSkuInfo.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ArmStreamingEndpointSkuInfo.java new file mode 100644 index 0000000000000..fb290ec7edd37 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ArmStreamingEndpointSkuInfo.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ArmStreamingEndpointSkuInfo model. */ +@Fluent +public final class ArmStreamingEndpointSkuInfo { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ArmStreamingEndpointSkuInfo.class); + + /* + * The resourceType property. + */ + @JsonProperty(value = "resourceType") + private String resourceType; + + /* + * The streaming endpoint sku capacity. + */ + @JsonProperty(value = "capacity") + private ArmStreamingEndpointCapacity capacity; + + /* + * The streaming endpoint sku. + */ + @JsonProperty(value = "sku") + private ArmStreamingEndpointSku sku; + + /** + * Get the resourceType property: The resourceType property. + * + * @return the resourceType value. + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Set the resourceType property: The resourceType property. + * + * @param resourceType the resourceType value to set. + * @return the ArmStreamingEndpointSkuInfo object itself. + */ + public ArmStreamingEndpointSkuInfo withResourceType(String resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Get the capacity property: The streaming endpoint sku capacity. + * + * @return the capacity value. + */ + public ArmStreamingEndpointCapacity capacity() { + return this.capacity; + } + + /** + * Set the capacity property: The streaming endpoint sku capacity. + * + * @param capacity the capacity value to set. + * @return the ArmStreamingEndpointSkuInfo object itself. + */ + public ArmStreamingEndpointSkuInfo withCapacity(ArmStreamingEndpointCapacity capacity) { + this.capacity = capacity; + return this; + } + + /** + * Get the sku property: The streaming endpoint sku. + * + * @return the sku value. + */ + public ArmStreamingEndpointSku sku() { + return this.sku; + } + + /** + * Set the sku property: The streaming endpoint sku. + * + * @param sku the sku value to set. + * @return the ArmStreamingEndpointSkuInfo object itself. + */ + public ArmStreamingEndpointSkuInfo withSku(ArmStreamingEndpointSku sku) { + this.sku = sku; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (capacity() != null) { + capacity().validate(); + } + if (sku() != null) { + sku().validate(); + } + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Asset.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Asset.java index 1b42a5277bbc2..1a17df8f95ab6 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Asset.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Asset.java @@ -296,7 +296,7 @@ interface WithStorageAccountName { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Asset Storage container SAS URLs. + * @return the Asset Storage container SAS URLs along with {@link Response}. */ Response listContainerSasWithResponse(ListContainerSasInput parameters, Context context); @@ -316,7 +316,8 @@ interface WithStorageAccountName { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Asset storage encryption keys used to decrypt content created by version 2 of the Media Services API. + * @return the Asset storage encryption keys used to decrypt content created by version 2 of the Media Services API + * along with {@link Response}. */ Response getEncryptionKeyWithResponse(Context context); @@ -336,7 +337,7 @@ interface WithStorageAccountName { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Streaming Locators associated with this Asset. + * @return the Streaming Locators associated with this Asset along with {@link Response}. */ Response listStreamingLocatorsWithResponse(Context context); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AssetFilters.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AssetFilters.java index 92aa1e15d11bd..7d5d58ed47d8b 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AssetFilters.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AssetFilters.java @@ -19,7 +19,7 @@ public interface AssetFilters { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of AssetFilter items. + * @return a collection of AssetFilter items as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String accountName, String assetName); @@ -33,7 +33,7 @@ public interface AssetFilters { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of AssetFilter items. + * @return a collection of AssetFilter items as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String accountName, String assetName, Context context); @@ -62,7 +62,7 @@ public interface AssetFilters { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Asset Filter associated with the specified Asset. + * @return the details of an Asset Filter associated with the specified Asset along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String accountName, String assetName, String filterName, Context context); @@ -91,7 +91,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse( String resourceGroupName, String accountName, String assetName, String filterName, Context context); @@ -103,7 +103,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Asset Filter associated with the specified Asset. + * @return the details of an Asset Filter associated with the specified Asset along with {@link Response}. */ AssetFilter getById(String id); @@ -115,7 +115,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Asset Filter associated with the specified Asset. + * @return the details of an Asset Filter associated with the specified Asset along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); @@ -137,7 +137,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AssetTrack.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AssetTrack.java new file mode 100644 index 0000000000000..9cce7eaa1e706 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AssetTrack.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.mediaservices.fluent.models.AssetTrackInner; + +/** An immutable client-side representation of AssetTrack. */ +public interface AssetTrack { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the track property: Detailed information about a track in the asset. + * + * @return the track value. + */ + TrackBase track(); + + /** + * Gets the provisioningState property: Provisioning state of the asset track. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the inner com.azure.resourcemanager.mediaservices.fluent.models.AssetTrackInner object. + * + * @return the inner object. + */ + AssetTrackInner innerModel(); + + /** The entirety of the AssetTrack definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The AssetTrack definition stages. */ + interface DefinitionStages { + /** The first stage of the AssetTrack definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the AssetTrack definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, accountName, assetName. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @return the next definition stage. + */ + WithCreate withExistingAsset(String resourceGroupName, String accountName, String assetName); + } + /** + * The stage of the AssetTrack definition which contains all the minimum required properties for the resource to + * be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTrack { + /** + * Executes the create request. + * + * @return the created resource. + */ + AssetTrack create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + AssetTrack create(Context context); + } + /** The stage of the AssetTrack definition allowing to specify track. */ + interface WithTrack { + /** + * Specifies the track property: Detailed information about a track in the asset.. + * + * @param track Detailed information about a track in the asset. + * @return the next definition stage. + */ + WithCreate withTrack(TrackBase track); + } + } + /** + * Begins update for the AssetTrack resource. + * + * @return the stage of resource update. + */ + AssetTrack.Update update(); + + /** The template for AssetTrack update. */ + interface Update extends UpdateStages.WithTrack { + /** + * Executes the update request. + * + * @return the updated resource. + */ + AssetTrack apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + AssetTrack apply(Context context); + } + /** The AssetTrack update stages. */ + interface UpdateStages { + /** The stage of the AssetTrack update allowing to specify track. */ + interface WithTrack { + /** + * Specifies the track property: Detailed information about a track in the asset.. + * + * @param track Detailed information about a track in the asset. + * @return the next definition stage. + */ + Update withTrack(TrackBase track); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + AssetTrack refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + AssetTrack refresh(Context context); + + /** + * Update the track data. Call this API after any changes are made to the track data stored in the asset container. + * For example, you have modified the WebVTT captions file in the Azure blob storage container for the asset, + * viewers will not see the new version of the captions unless this API is called. Note, the changes may not be + * reflected immediately. CDN cache may also need to be purged if applicable. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void updateTrackData(); + + /** + * Update the track data. Call this API after any changes are made to the track data stored in the asset container. + * For example, you have modified the WebVTT captions file in the Azure blob storage container for the asset, + * viewers will not see the new version of the captions unless this API is called. Note, the changes may not be + * reflected immediately. CDN cache may also need to be purged if applicable. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void updateTrackData(Context context); +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AssetTrackCollection.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AssetTrackCollection.java new file mode 100644 index 0000000000000..2628e3a84f490 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AssetTrackCollection.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.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mediaservices.fluent.models.AssetTrackInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A collection of AssetTrack items. */ +@Fluent +public final class AssetTrackCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AssetTrackCollection.class); + + /* + * A collection of AssetTrack items. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value property: A collection of AssetTrack items. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A collection of AssetTrack items. + * + * @param value the value value to set. + * @return the AssetTrackCollection object itself. + */ + public AssetTrackCollection withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AssetTrackOperationStatus.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AssetTrackOperationStatus.java new file mode 100644 index 0000000000000..fec082b08603c --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AssetTrackOperationStatus.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.mediaservices.fluent.models.AssetTrackOperationStatusInner; +import java.time.OffsetDateTime; + +/** An immutable client-side representation of AssetTrackOperationStatus. */ +public interface AssetTrackOperationStatus { + /** + * Gets the name property: Operation identifier. + * + * @return the name value. + */ + String name(); + + /** + * Gets the id property: Operation resource ID. + * + * @return the id value. + */ + String id(); + + /** + * Gets the startTime property: Operation start time. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: Operation end time. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the error property: The error detail. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the inner com.azure.resourcemanager.mediaservices.fluent.models.AssetTrackOperationStatusInner object. + * + * @return the inner object. + */ + AssetTrackOperationStatusInner innerModel(); +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Assets.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Assets.java index e72d57e6f1f92..0308aa0b6673c 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Assets.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Assets.java @@ -18,7 +18,7 @@ public interface Assets { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of Asset items. + * @return a collection of Asset items as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String accountName); @@ -35,7 +35,7 @@ public interface Assets { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of Asset items. + * @return a collection of Asset items as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, String accountName, String filter, Integer top, String orderby, Context context); @@ -63,7 +63,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Asset in the Media Services account. + * @return the details of an Asset in the Media Services account along with {@link Response}. */ Response getWithResponse(String resourceGroupName, String accountName, String assetName, Context context); @@ -89,7 +89,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse(String resourceGroupName, String accountName, String assetName, Context context); @@ -121,7 +121,7 @@ AssetContainerSas listContainerSas( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Asset Storage container SAS URLs. + * @return the Asset Storage container SAS URLs along with {@link Response}. */ Response listContainerSasWithResponse( String resourceGroupName, @@ -154,7 +154,8 @@ StorageEncryptedAssetDecryptionData getEncryptionKey( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Asset storage encryption keys used to decrypt content created by version 2 of the Media Services API. + * @return the Asset storage encryption keys used to decrypt content created by version 2 of the Media Services API + * along with {@link Response}. */ Response getEncryptionKeyWithResponse( String resourceGroupName, String accountName, String assetName, Context context); @@ -182,7 +183,7 @@ Response getEncryptionKeyWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Streaming Locators associated with this Asset. + * @return the Streaming Locators associated with this Asset along with {@link Response}. */ Response listStreamingLocatorsWithResponse( String resourceGroupName, String accountName, String assetName, Context context); @@ -194,7 +195,7 @@ Response listStreamingLocatorsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Asset in the Media Services account. + * @return the details of an Asset in the Media Services account along with {@link Response}. */ Asset getById(String id); @@ -206,7 +207,7 @@ Response listStreamingLocatorsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Asset in the Media Services account. + * @return the details of an Asset in the Media Services account along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); @@ -228,7 +229,7 @@ Response listStreamingLocatorsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); 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 e7bbd4fbaa274..7e8789370579a 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 74082352cb394..878cb22fb42d5 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 3ec53b2249f66..e3c8c60b71f2c 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/AudioTrack.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AudioTrack.java new file mode 100644 index 0000000000000..a7c9bf57908d8 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AudioTrack.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Represents an audio track in the asset. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") +@JsonTypeName("#Microsoft.Media.AudioTrack") +@Immutable +public final class AudioTrack extends TrackBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AudioTrack.class); + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AudioTrackDescriptor.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AudioTrackDescriptor.java index e6b5c5dcaecbb..ccaa1dc20f77b 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 e5897c5827582..50b93187446bf 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,17 +12,16 @@ 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); /* - * PresetConfigurations are only supported for the ContentAwareEncoding and - * H265ContentAwareEncoding built-in presets. These settings will not - * affect other built-in or custom defined presets. + * Optional configuration settings for encoder. Configurations is only + * supported for ContentAwareEncoding and H265ContentAwareEncoding + * BuiltInStandardEncoderPreset. */ @JsonProperty(value = "configurations") private PresetConfigurations configurations; @@ -35,9 +33,8 @@ public class BuiltInStandardEncoderPreset extends Preset { private EncoderNamedPreset presetName; /** - * Get the configurations property: PresetConfigurations are only supported for the ContentAwareEncoding and - * H265ContentAwareEncoding built-in presets. These settings will not affect other built-in or custom defined - * presets. + * Get the configurations property: Optional configuration settings for encoder. Configurations is only supported + * for ContentAwareEncoding and H265ContentAwareEncoding BuiltInStandardEncoderPreset. * * @return the configurations value. */ @@ -46,9 +43,8 @@ public PresetConfigurations configurations() { } /** - * Set the configurations property: PresetConfigurations are only supported for the ContentAwareEncoding and - * H265ContentAwareEncoding built-in presets. These settings will not affect other built-in or custom defined - * presets. + * Set the configurations property: Optional configuration settings for encoder. Configurations is only supported + * for ContentAwareEncoding and H265ContentAwareEncoding BuiltInStandardEncoderPreset. * * @param configurations the configurations value to set. * @return the BuiltInStandardEncoderPreset object itself. 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 6de88134d1f76..b6f62cd8f24af 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 b7eb3c2e4d2d9..dcbf862d961c5 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/ContentKeyPolicies.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicies.java index 2da1fb425d8f0..985af592731e7 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicies.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicies.java @@ -18,7 +18,7 @@ public interface ContentKeyPolicies { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of ContentKeyPolicy items. + * @return a collection of ContentKeyPolicy items as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String accountName); @@ -35,7 +35,7 @@ public interface ContentKeyPolicies { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of ContentKeyPolicy items. + * @return a collection of ContentKeyPolicy items as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, String accountName, String filter, Integer top, String orderby, Context context); @@ -63,7 +63,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Content Key Policy in the Media Services account. + * @return the details of a Content Key Policy in the Media Services account along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String accountName, String contentKeyPolicyName, Context context); @@ -90,7 +90,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse( String resourceGroupName, String accountName, String contentKeyPolicyName, Context context); @@ -119,7 +119,7 @@ ContentKeyPolicyProperties getPolicyPropertiesWithSecrets( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Content Key Policy including secret values. + * @return a Content Key Policy including secret values along with {@link Response}. */ Response getPolicyPropertiesWithSecretsWithResponse( String resourceGroupName, String accountName, String contentKeyPolicyName, Context context); @@ -131,7 +131,7 @@ Response getPolicyPropertiesWithSecretsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Content Key Policy in the Media Services account. + * @return the details of a Content Key Policy in the Media Services account along with {@link Response}. */ ContentKeyPolicy getById(String id); @@ -143,7 +143,7 @@ Response getPolicyPropertiesWithSecretsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Content Key Policy in the Media Services account. + * @return the details of a Content Key Policy in the Media Services account along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); @@ -165,7 +165,7 @@ Response getPolicyPropertiesWithSecretsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicy.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicy.java index 28e34e140ec2e..77b3ecbf3afe2 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicy.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicy.java @@ -223,7 +223,7 @@ interface WithOptions { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Content Key Policy including secret values. + * @return a Content Key Policy including secret values along with {@link Response}. */ Response getPolicyPropertiesWithSecretsWithResponse(Context context); } 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 52c83649e53a1..c5ec8dafdeaf9 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 12e5de21c8ded..f5e836ccd7c10 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 db2ca40c32b63..2ccc2279608fb 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 9ae3f2cf0aaba..3e52d2d0e2603 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 21b29e5d3c386..996211afae7cd 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 4a507ba25f8de..59fd30a4583f1 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 f738b5307cfee..a15a13d3b2dbf 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 23077fb7f2a6b..d5aa3158bc354 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 99201ef2fd25e..47f7f7cb4ce8c 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 8e5e9ede7e5ea..ed0053cd1811b 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 ecf9ad8c78c83..92c0fc7c85981 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 ea6e5463d6b14..9f0dad7cb2359 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 beab34d41120d..28c45a9e38dbc 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 16e3e9cdba7cd..5540e043f7fb4 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 403e591daafab..bf4c36a5dae13 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 3a412cfa3d28b..46fcf64329d05 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 088d4f39980d5..29bd553489ea5 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 a15a3e55b410f..f8131637686bd 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 9317b0469f432..47ee19b755a19 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 36aee3d6d06ec..31972c01f924f 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 95284990c07a5..0c6eea25c36c3 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 810c56df42f74..c081d210ade4f 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 1dd9dc2d709e9..f9a78342be3aa 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 6b0553f461924..3207b07c38b19 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,23 +5,17 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; import java.time.Duration; /** * Describes the settings to be used when encoding the input video into a desired output bitrate layer with the H.264 * video codec. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.H264Layer") -@JsonFlatten @Fluent -public class H264Layer extends VideoLayer { +public final class H264Layer extends VideoLayer { @JsonIgnore private final ClientLogger logger = new ClientLogger(H264Layer.class); /* @@ -48,6 +42,17 @@ public class H264Layer extends VideoLayer { @JsonProperty(value = "bufferWindow") private Duration bufferWindow; + /* + * The value of CRF to be used when encoding this layer. This setting takes + * effect when RateControlMode of video codec is set at CRF mode. The range + * of CRF value is between 0 and 51, where lower values would result in + * better quality, at the expense of higher file sizes. Higher values mean + * more compression, but at some point quality degradation will be noticed. + * Default value is 23. + */ + @JsonProperty(value = "crf") + private Float crf; + /* * The number of reference frames to be used when encoding this layer. If * not specified, the encoder determines an appropriate number based on the @@ -129,6 +134,32 @@ public H264Layer withBufferWindow(Duration bufferWindow) { return this; } + /** + * Get the crf property: The value of CRF to be used when encoding this layer. This setting takes effect when + * RateControlMode of video codec is set at CRF mode. The range of CRF value is between 0 and 51, where lower values + * would result in better quality, at the expense of higher file sizes. Higher values mean more compression, but at + * some point quality degradation will be noticed. Default value is 23. + * + * @return the crf value. + */ + public Float crf() { + return this.crf; + } + + /** + * Set the crf property: The value of CRF to be used when encoding this layer. This setting takes effect when + * RateControlMode of video codec is set at CRF mode. The range of CRF value is between 0 and 51, where lower values + * would result in better quality, at the expense of higher file sizes. Higher values mean more compression, but at + * some point quality degradation will be noticed. Default value is 23. + * + * @param crf the crf value to set. + * @return the H264Layer object itself. + */ + public H264Layer withCrf(Float crf) { + this.crf = crf; + return this; + } + /** * Get the referenceFrames property: The number of reference frames to be used when encoding this layer. If not * specified, the encoder determines an appropriate number based on the encoder complexity setting. diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H264RateControlMode.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H264RateControlMode.java new file mode 100644 index 0000000000000..5fac213a7d6fb --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H264RateControlMode.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for H264RateControlMode. */ +public final class H264RateControlMode extends ExpandableStringEnum { + /** Static value ABR for H264RateControlMode. */ + public static final H264RateControlMode ABR = fromString("ABR"); + + /** Static value CBR for H264RateControlMode. */ + public static final H264RateControlMode CBR = fromString("CBR"); + + /** Static value CRF for H264RateControlMode. */ + public static final H264RateControlMode CRF = fromString("CRF"); + + /** + * Creates or finds a H264RateControlMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding H264RateControlMode. + */ + @JsonCreator + public static H264RateControlMode fromString(String name) { + return fromString(name, H264RateControlMode.class); + } + + /** @return known H264RateControlMode values. */ + public static Collection values() { + return values(H264RateControlMode.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 391d62ffb8bc0..15375ebebe7c6 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,22 +14,12 @@ 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); - /* - * Whether or not the encoder should insert key frames at scene changes. If - * not specified, the default is false. This flag should be set to true - * only when the encoder is being configured to produce a single output - * video. - */ - @JsonProperty(value = "sceneChangeDetection") - private Boolean sceneChangeDetection; - /* * Tells the encoder how to choose its encoding settings. The default value * is Balanced. @@ -44,29 +33,20 @@ public class H264Video extends Video { @JsonProperty(value = "layers") private List layers; - /** - * Get the sceneChangeDetection property: Whether or not the encoder should insert key frames at scene changes. If - * not specified, the default is false. This flag should be set to true only when the encoder is being configured to - * produce a single output video. - * - * @return the sceneChangeDetection value. + /* + * The video rate control mode */ - public Boolean sceneChangeDetection() { - return this.sceneChangeDetection; - } + @JsonProperty(value = "rateControlMode") + private H264RateControlMode rateControlMode; - /** - * Set the sceneChangeDetection property: Whether or not the encoder should insert key frames at scene changes. If - * not specified, the default is false. This flag should be set to true only when the encoder is being configured to - * produce a single output video. - * - * @param sceneChangeDetection the sceneChangeDetection value to set. - * @return the H264Video object itself. + /* + * Whether or not the encoder should insert key frames at scene changes. If + * not specified, the default is false. This flag should be set to true + * only when the encoder is being configured to produce a single output + * video. */ - public H264Video withSceneChangeDetection(Boolean sceneChangeDetection) { - this.sceneChangeDetection = sceneChangeDetection; - return this; - } + @JsonProperty(value = "sceneChangeDetection") + private Boolean sceneChangeDetection; /** * Get the complexity property: Tells the encoder how to choose its encoding settings. The default value is @@ -110,6 +90,50 @@ public H264Video withLayers(List layers) { return this; } + /** + * Get the rateControlMode property: The video rate control mode. + * + * @return the rateControlMode value. + */ + public H264RateControlMode rateControlMode() { + return this.rateControlMode; + } + + /** + * Set the rateControlMode property: The video rate control mode. + * + * @param rateControlMode the rateControlMode value to set. + * @return the H264Video object itself. + */ + public H264Video withRateControlMode(H264RateControlMode rateControlMode) { + this.rateControlMode = rateControlMode; + return this; + } + + /** + * Get the sceneChangeDetection property: Whether or not the encoder should insert key frames at scene changes. If + * not specified, the default is false. This flag should be set to true only when the encoder is being configured to + * produce a single output video. + * + * @return the sceneChangeDetection value. + */ + public Boolean sceneChangeDetection() { + return this.sceneChangeDetection; + } + + /** + * Set the sceneChangeDetection property: Whether or not the encoder should insert key frames at scene changes. If + * not specified, the default is false. This flag should be set to true only when the encoder is being configured to + * produce a single output video. + * + * @param sceneChangeDetection the sceneChangeDetection value to set. + * @return the H264Video object itself. + */ + public H264Video withSceneChangeDetection(Boolean sceneChangeDetection) { + this.sceneChangeDetection = sceneChangeDetection; + return this; + } + /** {@inheritDoc} */ @Override public H264Video withKeyFrameInterval(Duration keyFrameInterval) { 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 cd1a8f4df3711..9b70ecf103f43 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,23 +5,17 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; import java.time.Duration; /** * Describes the settings to be used when encoding the input video into a desired output bitrate layer with the H.265 * video codec. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.H265Layer") -@JsonFlatten @Fluent -public class H265Layer extends H265VideoLayer { +public final class H265Layer extends H265VideoLayer { @JsonIgnore private final ClientLogger logger = new ClientLogger(H265Layer.class); /* @@ -47,6 +41,17 @@ public class H265Layer extends H265VideoLayer { @JsonProperty(value = "bufferWindow") private Duration bufferWindow; + /* + * The value of CRF to be used when encoding this layer. This setting takes + * effect when RateControlMode of video codec is set at CRF mode. The range + * of CRF value is between 0 and 51, where lower values would result in + * better quality, at the expense of higher file sizes. Higher values mean + * more compression, but at some point quality degradation will be noticed. + * Default value is 28. + */ + @JsonProperty(value = "crf") + private Float crf; + /* * The number of reference frames to be used when encoding this layer. If * not specified, the encoder determines an appropriate number based on the @@ -121,6 +126,32 @@ public H265Layer withBufferWindow(Duration bufferWindow) { return this; } + /** + * Get the crf property: The value of CRF to be used when encoding this layer. This setting takes effect when + * RateControlMode of video codec is set at CRF mode. The range of CRF value is between 0 and 51, where lower values + * would result in better quality, at the expense of higher file sizes. Higher values mean more compression, but at + * some point quality degradation will be noticed. Default value is 28. + * + * @return the crf value. + */ + public Float crf() { + return this.crf; + } + + /** + * Set the crf property: The value of CRF to be used when encoding this layer. This setting takes effect when + * RateControlMode of video codec is set at CRF mode. The range of CRF value is between 0 and 51, where lower values + * would result in better quality, at the expense of higher file sizes. Higher values mean more compression, but at + * some point quality degradation will be noticed. Default value is 28. + * + * @param crf the crf value to set. + * @return the H265Layer object itself. + */ + public H265Layer withCrf(Float crf) { + this.crf = crf; + return this; + } + /** * Get the referenceFrames property: The number of reference frames to be used when encoding this layer. If not * specified, the encoder determines an appropriate number based on the encoder complexity setting. 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 ea102774806a8..c51b870445929 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 2ebabc012d240..2e7e01482d5ee 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,23 +5,11 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; /** Describes the settings to be used when encoding the input video into a desired output bitrate layer. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", - defaultImpl = H265VideoLayer.class) -@JsonTypeName("#Microsoft.Media.H265VideoLayer") -@JsonSubTypes({@JsonSubTypes.Type(name = "#Microsoft.Media.H265Layer", value = H265Layer.class)}) -@JsonFlatten @Fluent public class H265VideoLayer extends Layer { @JsonIgnore private final ClientLogger logger = new ClientLogger(H265VideoLayer.class); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265VideoProfile.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265VideoProfile.java index 6ef201539d447..3b02930a76af6 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265VideoProfile.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265VideoProfile.java @@ -16,6 +16,9 @@ public final class H265VideoProfile extends ExpandableStringEnum cancelJobWithResponse(Context context); } 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 b2094712c44b0..9caf77b7e67a1 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 4dc34aaa02710..984b125127d79 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 ffe6f6dc71c79..684c66d38551d 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 ae9679245f974..53b893d9881bf 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 71d9ce30f7dfe..c3a3268dd4e38 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 c1f095f8012d3..381c2b70fc6bb 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 c70c54267df64..2bddf002aacad 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 eb1469a1d702d..8b6a6559c9a06 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/Jobs.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Jobs.java index 3bd5954043c36..fd0154250f121 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Jobs.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Jobs.java @@ -19,7 +19,7 @@ public interface Jobs { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of Job items. + * @return a collection of Job items as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String accountName, String transformName); @@ -35,7 +35,7 @@ public interface Jobs { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of Job items. + * @return a collection of Job items as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, @@ -70,7 +70,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job. + * @return a Job along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String accountName, String transformName, String jobName, Context context); @@ -99,7 +99,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse( String resourceGroupName, String accountName, String transformName, String jobName, Context context); @@ -128,7 +128,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response cancelJobWithResponse( String resourceGroupName, String accountName, String transformName, String jobName, Context context); @@ -140,7 +140,7 @@ Response cancelJobWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job. + * @return a Job along with {@link Response}. */ Job getById(String id); @@ -152,7 +152,7 @@ Response cancelJobWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job. + * @return a Job along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); @@ -174,7 +174,7 @@ Response cancelJobWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); 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 d2a6863b27c3a..025c6514cd5a6 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 bf195417d9f8a..12a50da2dfe6f 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 f5a1d7827c7ed..f8c9bde314a25 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,19 +5,13 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; /** Describes the settings to produce a JPEG image from the input video. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.JpgLayer") -@JsonFlatten @Fluent -public class JpgLayer extends Layer { +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 b0906100916b3..2452e97d79797 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,31 +5,14 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; /** * The encoder can be configured to produce video and/or images (thumbnails) at different resolutions, by specifying a * layer for each desired resolution. A layer represents the properties for the video or image at a resolution. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", - defaultImpl = Layer.class) -@JsonTypeName("Layer") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "#Microsoft.Media.H265VideoLayer", value = H265VideoLayer.class), - @JsonSubTypes.Type(name = "#Microsoft.Media.VideoLayer", value = VideoLayer.class), - @JsonSubTypes.Type(name = "#Microsoft.Media.JpgLayer", value = JpgLayer.class), - @JsonSubTypes.Type(name = "#Microsoft.Media.PngLayer", value = PngLayer.class) -}) -@JsonFlatten @Fluent public class Layer { @JsonIgnore private final ClientLogger logger = new ClientLogger(Layer.class); 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 8b08c14cb8065..eb61c50430be8 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 34c0da46945a0..c59030be4c1f9 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 0230f2d234726..d8d721e3edef9 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 as paginated response with {@link PagedIterable}. */ 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 as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String accountName, Context context); @@ -58,7 +58,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 properties of a live event. + * @return properties of a live event along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String accountName, String liveEventName, Context context); @@ -206,7 +206,7 @@ void stop( * @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 properties of a live event. + * @return properties of a live event along with {@link Response}. */ LiveEvent getById(String id); @@ -218,7 +218,7 @@ void stop( * @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 properties of a live event. + * @return properties of a live event along with {@link Response}. */ Response getByIdWithResponse(String id, 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 cc8d4f491c28d..4f5da15158409 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 9c4e04353cba6..8233f70e3af8b 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 as paginated response with {@link PagedIterable}. */ 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 as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String accountName, String liveEventName, Context context); @@ -62,7 +62,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 a live output. + * @return a live output along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String accountName, String liveEventName, String liveOutputName, Context context); @@ -102,7 +102,7 @@ void delete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a live output. + * @return a live output along with {@link Response}. */ LiveOutput getById(String id); @@ -114,7 +114,7 @@ void delete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a live output. + * @return a live output along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Locations.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Locations.java index 56847bbc3110a..e15647a34dbec 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Locations.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Locations.java @@ -12,7 +12,7 @@ public interface Locations { /** * Checks whether the Media Service resource name is available. * - * @param locationName The name of the location. + * @param locationName Location name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -24,13 +24,13 @@ public interface Locations { /** * Checks whether the Media Service resource name is available. * - * @param locationName The name of the location. + * @param locationName Location name. * @param parameters The request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from the check name availability request. + * @return the response from the check name availability request along with {@link Response}. */ Response checkNameAvailabilityWithResponse( String locationName, CheckNameAvailabilityInput parameters, Context context); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaService.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaService.java index 96a0e20b02c5c..0f66b61090a95 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaService.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaService.java @@ -51,18 +51,18 @@ public interface MediaService { Map tags(); /** - * Gets the identity property: The Managed Identity for the Media Services account. + * Gets the systemData property: The system metadata relating to this resource. * - * @return the identity value. + * @return the systemData value. */ - MediaServiceIdentity identity(); + SystemData systemData(); /** - * Gets the systemData property: The system metadata relating to this resource. + * Gets the identity property: The Managed Identity for the Media Services account. * - * @return the systemData value. + * @return the identity value. */ - SystemData systemData(); + MediaServiceIdentity identity(); /** * Gets the mediaServiceId property: The Media Services account ID. @@ -107,6 +107,21 @@ public interface MediaService { */ PublicNetworkAccess publicNetworkAccess(); + /** + * Gets the provisioningState property: Provisioning state of the Media Services account. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the privateEndpointConnections property: The Private Endpoint Connections created for the Media Service + * account. + * + * @return the privateEndpointConnections value. + */ + Object privateEndpointConnections(); + /** * Gets the region of the resource. * @@ -407,12 +422,12 @@ interface WithPublicNetworkAccess { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response syncStorageKeysWithResponse(SyncStorageKeysInput parameters, Context context); /** - * List the media edge policies associated with the Media Services account. + * List all the media edge policies associated with the Media Services account. * * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -423,14 +438,14 @@ interface WithPublicNetworkAccess { EdgePolicies listEdgePolicies(ListEdgePoliciesInput parameters); /** - * List the media edge policies associated with the Media Services account. + * List all the media edge policies associated with the Media Services account. * * @param parameters The request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ Response listEdgePoliciesWithResponse(ListEdgePoliciesInput parameters, 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 f839364786eb4..f1237914af6d5 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/MediaServiceOperationResults.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationResults.java new file mode 100644 index 0000000000000..9fab861bc18b3 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationResults.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of MediaServiceOperationResults. */ +public interface MediaServiceOperationResults { + /** + * Get media service operation result. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return media service operation result. + */ + MediaService get(String locationName, String operationId); + + /** + * Get media service operation result. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return media service operation result. + */ + Response getWithResponse(String locationName, String operationId, Context context); +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationResultsGetHeaders.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationResultsGetHeaders.java new file mode 100644 index 0000000000000..5de1fac5c5766 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationResultsGetHeaders.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The MediaServiceOperationResultsGetHeaders model. */ +@Fluent +public final class MediaServiceOperationResultsGetHeaders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MediaServiceOperationResultsGetHeaders.class); + + /* + * The Retry-After property. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /* + * The Azure-AsyncOperation property. + */ + @JsonProperty(value = "Azure-AsyncOperation") + private String azureAsyncOperation; + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer retryAfter() { + return this.retryAfter; + } + + /** + * Set the retryAfter property: The Retry-After property. + * + * @param retryAfter the retryAfter value to set. + * @return the MediaServiceOperationResultsGetHeaders object itself. + */ + public MediaServiceOperationResultsGetHeaders withRetryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * Get the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @return the azureAsyncOperation value. + */ + public String azureAsyncOperation() { + return this.azureAsyncOperation; + } + + /** + * Set the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @param azureAsyncOperation the azureAsyncOperation value to set. + * @return the MediaServiceOperationResultsGetHeaders object itself. + */ + public MediaServiceOperationResultsGetHeaders withAzureAsyncOperation(String azureAsyncOperation) { + this.azureAsyncOperation = azureAsyncOperation; + return this; + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the MediaServiceOperationResultsGetHeaders object itself. + */ + public MediaServiceOperationResultsGetHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationResultsGetResponse.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationResultsGetResponse.java new file mode 100644 index 0000000000000..f6f0728d90153 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationResultsGetResponse.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceInner; + +/** Contains all response data for the get operation. */ +public final class MediaServiceOperationResultsGetResponse + extends ResponseBase { + /** + * Creates an instance of MediaServiceOperationResultsGetResponse. + * + * @param request the request which resulted in this MediaServiceOperationResultsGetResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public MediaServiceOperationResultsGetResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + MediaServiceInner value, + MediaServiceOperationResultsGetHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public MediaServiceInner getValue() { + return super.getValue(); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationStatus.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationStatus.java new file mode 100644 index 0000000000000..217a11fc76a02 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationStatus.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceOperationStatusInner; +import java.time.OffsetDateTime; + +/** An immutable client-side representation of MediaServiceOperationStatus. */ +public interface MediaServiceOperationStatus { + /** + * Gets the name property: Operation identifier. + * + * @return the name value. + */ + String name(); + + /** + * Gets the id property: Operation resource ID. + * + * @return the id value. + */ + String id(); + + /** + * Gets the startTime property: Operation start time. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: Operation end time. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the error property: The error detail. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the inner com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceOperationStatusInner object. + * + * @return the inner object. + */ + MediaServiceOperationStatusInner innerModel(); +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationStatuses.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationStatuses.java new file mode 100644 index 0000000000000..50887fe693025 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationStatuses.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of MediaServiceOperationStatuses. */ +public interface MediaServiceOperationStatuses { + /** + * Get media service operation status. + * + * @param locationName Location name. + * @param operationId Operation ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return media service operation status. + */ + MediaServiceOperationStatus get(String locationName, String operationId); + + /** + * Get media service operation status. + * + * @param locationName Location name. + * @param operationId Operation ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return media service operation status along with {@link Response}. + */ + Response getWithResponse(String locationName, String operationId, Context context); +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceUpdate.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceUpdate.java index 3f821c400a369..bcf92f2fe50da 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. + * The resource properties. */ - @JsonProperty(value = "properties.storageAuthentication") - private StorageAuthentication storageAuthentication; + @JsonProperty(value = "properties") + private MediaServiceProperties innerProperties; /* - * 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. + * 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,27 +206,43 @@ 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; } + /** + * Get the provisioningState property: Provisioning state of the Media Services account. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the privateEndpointConnections property: The Private Endpoint Connections created for the Media Service + * account. + * + * @return the privateEndpointConnections value. + */ + public Object privateEndpointConnections() { + return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections(); + } + /** * Validates the instance. * * @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/Mediaservices.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Mediaservices.java index f7698928c9b8a..e22564b960eed 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Mediaservices.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Mediaservices.java @@ -17,7 +17,7 @@ public interface Mediaservices { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of MediaService items. + * @return a collection of MediaService items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -29,7 +29,7 @@ public interface Mediaservices { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of MediaService items. + * @return a collection of MediaService items as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -54,7 +54,7 @@ public interface Mediaservices { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Media Services account. + * @return the details of a Media Services account along with {@link Response}. */ Response getByResourceGroupWithResponse( String resourceGroupName, String accountName, Context context); @@ -79,7 +79,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse(String resourceGroupName, String accountName, Context context); @@ -105,13 +105,13 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response syncStorageKeysWithResponse( String resourceGroupName, String accountName, SyncStorageKeysInput parameters, Context context); /** - * List the media edge policies associated with the Media Services account. + * List all the media edge policies associated with the Media Services account. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -124,7 +124,7 @@ Response syncStorageKeysWithResponse( EdgePolicies listEdgePolicies(String resourceGroupName, String accountName, ListEdgePoliciesInput parameters); /** - * List the media edge policies associated with the Media Services account. + * List all the media edge policies associated with the Media Services account. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -133,7 +133,7 @@ Response syncStorageKeysWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ Response listEdgePoliciesWithResponse( String resourceGroupName, String accountName, ListEdgePoliciesInput parameters, Context context); @@ -143,7 +143,7 @@ Response listEdgePoliciesWithResponse( * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of MediaService items. + * @return a collection of MediaService items as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -154,7 +154,7 @@ Response listEdgePoliciesWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of MediaService items. + * @return a collection of MediaService items as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); @@ -165,7 +165,7 @@ Response listEdgePoliciesWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Media Services account. + * @return the details of a Media Services account along with {@link Response}. */ MediaService getById(String id); @@ -177,7 +177,7 @@ Response listEdgePoliciesWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Media Services account. + * @return the details of a Media Services account along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); @@ -199,7 +199,7 @@ Response listEdgePoliciesWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaservicesCreateOrUpdateHeaders.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaservicesCreateOrUpdateHeaders.java new file mode 100644 index 0000000000000..3ebd854535751 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaservicesCreateOrUpdateHeaders.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The MediaservicesCreateOrUpdateHeaders model. */ +@Fluent +public final class MediaservicesCreateOrUpdateHeaders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MediaservicesCreateOrUpdateHeaders.class); + + /* + * The Retry-After property. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /* + * The Azure-AsyncOperation property. + */ + @JsonProperty(value = "Azure-AsyncOperation") + private String azureAsyncOperation; + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer retryAfter() { + return this.retryAfter; + } + + /** + * Set the retryAfter property: The Retry-After property. + * + * @param retryAfter the retryAfter value to set. + * @return the MediaservicesCreateOrUpdateHeaders object itself. + */ + public MediaservicesCreateOrUpdateHeaders withRetryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * Get the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @return the azureAsyncOperation value. + */ + public String azureAsyncOperation() { + return this.azureAsyncOperation; + } + + /** + * Set the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @param azureAsyncOperation the azureAsyncOperation value to set. + * @return the MediaservicesCreateOrUpdateHeaders object itself. + */ + public MediaservicesCreateOrUpdateHeaders withAzureAsyncOperation(String azureAsyncOperation) { + this.azureAsyncOperation = azureAsyncOperation; + return this; + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the MediaservicesCreateOrUpdateHeaders object itself. + */ + public MediaservicesCreateOrUpdateHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaservicesCreateOrUpdateResponse.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaservicesCreateOrUpdateResponse.java new file mode 100644 index 0000000000000..52982b814907b --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaservicesCreateOrUpdateResponse.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceInner; + +/** Contains all response data for the createOrUpdate operation. */ +public final class MediaservicesCreateOrUpdateResponse + extends ResponseBase { + /** + * Creates an instance of MediaservicesCreateOrUpdateResponse. + * + * @param request the request which resulted in this MediaservicesCreateOrUpdateResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public MediaservicesCreateOrUpdateResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + MediaServiceInner value, + MediaservicesCreateOrUpdateHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public MediaServiceInner getValue() { + return super.getValue(); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaservicesUpdateHeaders.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaservicesUpdateHeaders.java new file mode 100644 index 0000000000000..e245d4ba4a459 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaservicesUpdateHeaders.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The MediaservicesUpdateHeaders model. */ +@Fluent +public final class MediaservicesUpdateHeaders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MediaservicesUpdateHeaders.class); + + /* + * The Retry-After property. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /* + * The Azure-AsyncOperation property. + */ + @JsonProperty(value = "Azure-AsyncOperation") + private String azureAsyncOperation; + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer retryAfter() { + return this.retryAfter; + } + + /** + * Set the retryAfter property: The Retry-After property. + * + * @param retryAfter the retryAfter value to set. + * @return the MediaservicesUpdateHeaders object itself. + */ + public MediaservicesUpdateHeaders withRetryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * Get the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @return the azureAsyncOperation value. + */ + public String azureAsyncOperation() { + return this.azureAsyncOperation; + } + + /** + * Set the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @param azureAsyncOperation the azureAsyncOperation value to set. + * @return the MediaservicesUpdateHeaders object itself. + */ + public MediaservicesUpdateHeaders withAzureAsyncOperation(String azureAsyncOperation) { + this.azureAsyncOperation = azureAsyncOperation; + return this; + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the MediaservicesUpdateHeaders object itself. + */ + public MediaservicesUpdateHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaservicesUpdateResponse.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaservicesUpdateResponse.java new file mode 100644 index 0000000000000..621e4ab8dbbf3 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaservicesUpdateResponse.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceInner; + +/** Contains all response data for the update operation. */ +public final class MediaservicesUpdateResponse extends ResponseBase { + /** + * Creates an instance of MediaservicesUpdateResponse. + * + * @param request the request which resulted in this MediaservicesUpdateResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public MediaservicesUpdateResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + MediaServiceInner value, + MediaservicesUpdateHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public MediaServiceInner getValue() { + return super.getValue(); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Mp4Format.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Mp4Format.java index 97c39c20a2d38..8e3f848c6a517 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 3c4adb7e0ec84..8e0792cd37d4b 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/OperationResults.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/OperationResults.java new file mode 100644 index 0000000000000..67c81b2f5bc99 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/OperationResults.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of OperationResults. */ +public interface OperationResults { + /** + * Get asset track operation result. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return asset track operation result. + */ + AssetTrack get( + String resourceGroupName, String accountName, String assetName, String trackName, String operationId); + + /** + * Get asset track operation result. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return asset track operation result. + */ + Response getWithResponse( + String resourceGroupName, + String accountName, + String assetName, + String trackName, + String operationId, + Context context); +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/OperationResultsGetHeaders.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/OperationResultsGetHeaders.java new file mode 100644 index 0000000000000..3862ed26748c9 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/OperationResultsGetHeaders.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The OperationResultsGetHeaders model. */ +@Fluent +public final class OperationResultsGetHeaders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationResultsGetHeaders.class); + + /* + * The Retry-After property. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /* + * The Azure-AsyncOperation property. + */ + @JsonProperty(value = "Azure-AsyncOperation") + private String azureAsyncOperation; + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer retryAfter() { + return this.retryAfter; + } + + /** + * Set the retryAfter property: The Retry-After property. + * + * @param retryAfter the retryAfter value to set. + * @return the OperationResultsGetHeaders object itself. + */ + public OperationResultsGetHeaders withRetryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * Get the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @return the azureAsyncOperation value. + */ + public String azureAsyncOperation() { + return this.azureAsyncOperation; + } + + /** + * Set the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @param azureAsyncOperation the azureAsyncOperation value to set. + * @return the OperationResultsGetHeaders object itself. + */ + public OperationResultsGetHeaders withAzureAsyncOperation(String azureAsyncOperation) { + this.azureAsyncOperation = azureAsyncOperation; + return this; + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the OperationResultsGetHeaders object itself. + */ + public OperationResultsGetHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/OperationResultsGetResponse.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/OperationResultsGetResponse.java new file mode 100644 index 0000000000000..8bfca33f2e2c2 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/OperationResultsGetResponse.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import com.azure.resourcemanager.mediaservices.fluent.models.AssetTrackInner; + +/** Contains all response data for the get operation. */ +public final class OperationResultsGetResponse extends ResponseBase { + /** + * Creates an instance of OperationResultsGetResponse. + * + * @param request the request which resulted in this OperationResultsGetResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public OperationResultsGetResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + AssetTrackInner value, + OperationResultsGetHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public AssetTrackInner getValue() { + return super.getValue(); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/OperationStatuses.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/OperationStatuses.java new file mode 100644 index 0000000000000..1093f4dd9b6b1 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/OperationStatuses.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of OperationStatuses. */ +public interface OperationStatuses { + /** + * Get asset track operation status. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return asset track operation status. + */ + AssetTrackOperationStatus get( + String resourceGroupName, String accountName, String assetName, String trackName, String operationId); + + /** + * Get asset track operation status. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return asset track operation status along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, + String accountName, + String assetName, + String trackName, + String operationId, + Context context); +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Operations.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Operations.java index c5e4f0cd4e811..87ebca54ba46c 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Operations.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Operations.java @@ -25,7 +25,7 @@ public interface Operations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of Operation items. + * @return a collection of Operation items along with {@link Response}. */ Response listWithResponse(Context context); } 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 2f7d59a501e40..150ac40a21a59 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 1ebf63f4de205..9ad20d86e08c4 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 0ba7948b9c491..7c78db011b69e 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 a196c3894e663..fb426b48fefaa 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,12 @@ 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") -@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 7c4707e415425..bd9f2efe6fed0 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/PrivateEndpointConnections.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PrivateEndpointConnections.java index 174357d96d13b..9a82a7f1046b7 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PrivateEndpointConnections.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PrivateEndpointConnections.java @@ -10,19 +10,19 @@ /** Resource collection API of PrivateEndpointConnections. */ public interface PrivateEndpointConnections { /** - * Get all private endpoint connections. + * List all private endpoint connections. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections. + * @return list of private endpoint connection associated with the specified storage account. */ PrivateEndpointConnectionListResult list(String resourceGroupName, String accountName); /** - * Get all private endpoint connections. + * List all private endpoint connections. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -30,13 +30,14 @@ public interface PrivateEndpointConnections { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections. + * @return list of private endpoint connection associated with the specified storage account along with {@link + * Response}. */ Response listWithResponse( String resourceGroupName, String accountName, Context context); /** - * Get private endpoint connection. + * Get the details of a private endpoint connection. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -44,12 +45,12 @@ Response listWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection. + * @return the details of a private endpoint connection. */ PrivateEndpointConnection get(String resourceGroupName, String accountName, String name); /** - * Get private endpoint connection. + * Get the details of a private endpoint connection. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -58,13 +59,13 @@ Response listWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection. + * @return the details of a private endpoint connection along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String accountName, String name, Context context); /** - * Delete private endpoint connection. + * Deletes a private endpoint connection. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -76,7 +77,7 @@ Response getWithResponse( void delete(String resourceGroupName, String accountName, String name); /** - * Delete private endpoint connection. + * Deletes a private endpoint connection. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -85,35 +86,35 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse(String resourceGroupName, String accountName, String name, Context context); /** - * Get private endpoint connection. + * Get the details of a private endpoint connection. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection. + * @return the details of a private endpoint connection along with {@link Response}. */ PrivateEndpointConnection getById(String id); /** - * Get private endpoint connection. + * Get the details of a private endpoint connection. * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection. + * @return the details of a private endpoint connection along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Delete private endpoint connection. + * Deletes a private endpoint connection. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -123,14 +124,14 @@ Response getWithResponse( void deleteById(String id); /** - * Delete private endpoint connection. + * Deletes a private endpoint connection. * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PrivateLinkResources.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PrivateLinkResources.java index 0abb32506b856..f7c5ce7425876 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PrivateLinkResources.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PrivateLinkResources.java @@ -10,19 +10,19 @@ /** Resource collection API of PrivateLinkResources. */ public interface PrivateLinkResources { /** - * Get list of group IDs. + * List supported group IDs. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of group IDs. + * @return a list of private link resources. */ PrivateLinkResourceListResult list(String resourceGroupName, String accountName); /** - * Get list of group IDs. + * List supported group IDs. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -30,13 +30,13 @@ public interface PrivateLinkResources { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of group IDs. + * @return a list of private link resources along with {@link Response}. */ Response listWithResponse( String resourceGroupName, String accountName, Context context); /** - * Get group ID. + * Get details of a group ID. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -44,12 +44,12 @@ Response listWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return group ID. + * @return details of a group ID. */ PrivateLinkResource get(String resourceGroupName, String accountName, String name); /** - * Get group ID. + * Get details of a group ID. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. @@ -58,7 +58,7 @@ Response listWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return group ID. + * @return details of a group ID along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String accountName, String name, Context context); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ProvisioningState.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ProvisioningState.java new file mode 100644 index 0000000000000..441815114d762 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ProvisioningState.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ProvisioningState. */ +public final class ProvisioningState extends ExpandableStringEnum { + /** Static value Failed for ProvisioningState. */ + public static final ProvisioningState FAILED = fromString("Failed"); + + /** Static value InProgress for ProvisioningState. */ + public static final ProvisioningState IN_PROGRESS = fromString("InProgress"); + + /** Static value Succeeded for ProvisioningState. */ + public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Creates or finds a ProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProvisioningState. + */ + @JsonCreator + public static ProvisioningState fromString(String name) { + return fromString(name, ProvisioningState.class); + } + + /** @return known ProvisioningState values. */ + public static Collection values() { + return values(ProvisioningState.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 c2127ec479903..db8151c71f293 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 1144ed6cc79b2..d8fbaa789ac39 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 e09ba68edc562..df23e77b0b436 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 d472e7e4ba6b8..e11112628035f 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 c27b028349e0c..969ca5b2205c7 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/StreamOptionsFlag.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamOptionsFlag.java index f725445bca5df..e0fe26220550d 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamOptionsFlag.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamOptionsFlag.java @@ -16,6 +16,9 @@ public final class StreamOptionsFlag extends ExpandableStringEnum tags); } + /** The stage of the StreamingEndpoint definition allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: The streaming endpoint sku.. + * + * @param sku The streaming endpoint sku. + * @return the next definition stage. + */ + WithCreate withSku(ArmStreamingEndpointCurrentSku sku); + } /** The stage of the StreamingEndpoint definition allowing to specify description. */ interface WithDescription { /** @@ -291,7 +309,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 { @@ -396,6 +414,7 @@ interface WithAutoStart { /** The template for StreamingEndpoint update. */ interface Update extends UpdateStages.WithTags, + UpdateStages.WithSku, UpdateStages.WithDescription, UpdateStages.WithScaleUnits, UpdateStages.WithAvailabilitySetName, @@ -433,6 +452,16 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the StreamingEndpoint update allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: The streaming endpoint sku.. + * + * @param sku The streaming endpoint sku. + * @return the next definition stage. + */ + Update withSku(ArmStreamingEndpointCurrentSku sku); + } /** The stage of the StreamingEndpoint update allowing to specify description. */ interface WithDescription { /** @@ -452,7 +481,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 8497ce2008df8..066107b4bbf92 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/StreamingEndpointSkuInfoListResult.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingEndpointSkuInfoListResult.java new file mode 100644 index 0000000000000..56bb8d1638ad9 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingEndpointSkuInfoListResult.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.resourcemanager.mediaservices.fluent.models.StreamingEndpointSkuInfoListResultInner; +import java.util.List; + +/** An immutable client-side representation of StreamingEndpointSkuInfoListResult. */ +public interface StreamingEndpointSkuInfoListResult { + /** + * Gets the value property: The result of the List StreamingEndpoint skus. + * + * @return the value value. + */ + List value(); + + /** + * Gets the inner com.azure.resourcemanager.mediaservices.fluent.models.StreamingEndpointSkuInfoListResultInner + * object. + * + * @return the inner object. + */ + StreamingEndpointSkuInfoListResultInner innerModel(); +} 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 112873206327e..ef31619fdb9e1 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 as paginated response with {@link PagedIterable}. */ 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 as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String accountName, Context context); @@ -58,7 +58,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 a streaming endpoint. + * @return a streaming endpoint along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String accountName, String streamingEndpointName, Context context); @@ -88,6 +88,34 @@ Response getWithResponse( */ void delete(String resourceGroupName, String accountName, String streamingEndpointName, Context context); + /** + * List streaming endpoint supported skus. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingEndpointName The name of the streaming endpoint, maximum length is 24. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + StreamingEndpointSkuInfoListResult skus(String resourceGroupName, String accountName, String streamingEndpointName); + + /** + * List streaming endpoint supported skus. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingEndpointName The name of the streaming endpoint, maximum length is 24. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + Response skusWithResponse( + String resourceGroupName, String accountName, String streamingEndpointName, Context context); + /** * Starts an existing streaming endpoint. * @@ -181,7 +209,7 @@ void scale( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a streaming endpoint. + * @return a streaming endpoint along with {@link Response}. */ StreamingEndpoint getById(String id); @@ -193,7 +221,7 @@ void scale( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a streaming endpoint. + * @return a streaming endpoint along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingLocator.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingLocator.java index 5c462e6a1d6dd..9ff6ee07a504b 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingLocator.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingLocator.java @@ -304,7 +304,7 @@ interface WithFilters { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return class of response for listContentKeys action. + * @return class of response for listContentKeys action along with {@link Response}. */ Response listContentKeysWithResponse(Context context); @@ -324,7 +324,7 @@ interface WithFilters { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return class of response for listPaths action. + * @return class of response for listPaths action along with {@link Response}. */ Response listPathsWithResponse(Context context); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingLocators.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingLocators.java index f4198d69ff1e0..0628049e6f49a 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingLocators.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingLocators.java @@ -18,7 +18,7 @@ public interface StreamingLocators { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of StreamingLocator items. + * @return a collection of StreamingLocator items as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String accountName); @@ -35,7 +35,7 @@ public interface StreamingLocators { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of StreamingLocator items. + * @return a collection of StreamingLocator items as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, String accountName, String filter, Integer top, String orderby, Context context); @@ -63,7 +63,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Streaming Locator in the Media Services account. + * @return the details of a Streaming Locator in the Media Services account along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String accountName, String streamingLocatorName, Context context); @@ -90,7 +90,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse( String resourceGroupName, String accountName, String streamingLocatorName, Context context); @@ -118,7 +118,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return class of response for listContentKeys action. + * @return class of response for listContentKeys action along with {@link Response}. */ Response listContentKeysWithResponse( String resourceGroupName, String accountName, String streamingLocatorName, Context context); @@ -146,7 +146,7 @@ Response listContentKeysWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return class of response for listPaths action. + * @return class of response for listPaths action along with {@link Response}. */ Response listPathsWithResponse( String resourceGroupName, String accountName, String streamingLocatorName, Context context); @@ -158,7 +158,7 @@ Response listPathsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Streaming Locator in the Media Services account. + * @return the details of a Streaming Locator in the Media Services account along with {@link Response}. */ StreamingLocator getById(String id); @@ -170,7 +170,7 @@ Response listPathsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Streaming Locator in the Media Services account. + * @return the details of a Streaming Locator in the Media Services account along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); @@ -192,7 +192,7 @@ Response listPathsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingPolicies.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingPolicies.java index a33ff6b4b6525..1a3ba3608ced9 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingPolicies.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingPolicies.java @@ -18,7 +18,7 @@ public interface StreamingPolicies { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of StreamingPolicy items. + * @return a collection of StreamingPolicy items as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String accountName); @@ -35,7 +35,7 @@ public interface StreamingPolicies { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of StreamingPolicy items. + * @return a collection of StreamingPolicy items as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, String accountName, String filter, Integer top, String orderby, Context context); @@ -63,7 +63,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Streaming Policy in the Media Services account. + * @return the details of a Streaming Policy in the Media Services account along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String accountName, String streamingPolicyName, Context context); @@ -90,7 +90,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse( String resourceGroupName, String accountName, String streamingPolicyName, Context context); @@ -102,7 +102,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Streaming Policy in the Media Services account. + * @return the details of a Streaming Policy in the Media Services account along with {@link Response}. */ StreamingPolicy getById(String id); @@ -114,7 +114,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Streaming Policy in the Media Services account. + * @return the details of a Streaming Policy in the Media Services account along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); @@ -136,7 +136,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TextTrack.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TextTrack.java new file mode 100644 index 0000000000000..76f102ae9cf37 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TextTrack.java @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Represents a text track in an asset. A text track is usually used for sparse data related to the audio or video + * tracks. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") +@JsonTypeName("#Microsoft.Media.TextTrack") +@Fluent +public final class TextTrack extends TrackBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TextTrack.class); + + /* + * The file name to the source file. This file is located in the storage + * container of the asset. + */ + @JsonProperty(value = "fileName") + private String fileName; + + /* + * The display name of the text track on a video player. In HLS, this maps + * to the NAME attribute of EXT-X-MEDIA. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /* + * The RFC5646 language code for the text track. + */ + @JsonProperty(value = "languageCode", access = JsonProperty.Access.WRITE_ONLY) + private String languageCode; + + /* + * When PlayerVisibility is set to "Visible", the text track will be + * present in the DASH manifest or HLS playlist when requested by a client. + * When the PlayerVisibility is set to "Hidden", the text will not be + * available to the client. The default value is "Visible". + */ + @JsonProperty(value = "playerVisibility") + private Visibility playerVisibility; + + /* + * The HLS specific setting for the text track. + */ + @JsonProperty(value = "hlsSettings") + private HlsSettings hlsSettings; + + /** + * Get the fileName property: The file name to the source file. This file is located in the storage container of the + * asset. + * + * @return the fileName value. + */ + public String fileName() { + return this.fileName; + } + + /** + * Set the fileName property: The file name to the source file. This file is located in the storage container of the + * asset. + * + * @param fileName the fileName value to set. + * @return the TextTrack object itself. + */ + public TextTrack withFileName(String fileName) { + this.fileName = fileName; + return this; + } + + /** + * Get the displayName property: The display name of the text track on a video player. In HLS, this maps to the NAME + * attribute of EXT-X-MEDIA. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: The display name of the text track on a video player. In HLS, this maps to the NAME + * attribute of EXT-X-MEDIA. + * + * @param displayName the displayName value to set. + * @return the TextTrack object itself. + */ + public TextTrack withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the languageCode property: The RFC5646 language code for the text track. + * + * @return the languageCode value. + */ + public String languageCode() { + return this.languageCode; + } + + /** + * Get the playerVisibility property: When PlayerVisibility is set to "Visible", the text track will be present in + * the DASH manifest or HLS playlist when requested by a client. When the PlayerVisibility is set to "Hidden", the + * text will not be available to the client. The default value is "Visible". + * + * @return the playerVisibility value. + */ + public Visibility playerVisibility() { + return this.playerVisibility; + } + + /** + * Set the playerVisibility property: When PlayerVisibility is set to "Visible", the text track will be present in + * the DASH manifest or HLS playlist when requested by a client. When the PlayerVisibility is set to "Hidden", the + * text will not be available to the client. The default value is "Visible". + * + * @param playerVisibility the playerVisibility value to set. + * @return the TextTrack object itself. + */ + public TextTrack withPlayerVisibility(Visibility playerVisibility) { + this.playerVisibility = playerVisibility; + return this; + } + + /** + * Get the hlsSettings property: The HLS specific setting for the text track. + * + * @return the hlsSettings value. + */ + public HlsSettings hlsSettings() { + return this.hlsSettings; + } + + /** + * Set the hlsSettings property: The HLS specific setting for the text track. + * + * @param hlsSettings the hlsSettings value to set. + * @return the TextTrack object itself. + */ + public TextTrack withHlsSettings(HlsSettings hlsSettings) { + this.hlsSettings = hlsSettings; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (hlsSettings() != null) { + hlsSettings().validate(); + } + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TrackBase.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TrackBase.java new file mode 100644 index 0000000000000..08454ebd099cb --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TrackBase.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Base type for concrete track types. A derived type must be used to represent the Track. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "@odata.type", + defaultImpl = TrackBase.class) +@JsonTypeName("TrackBase") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "#Microsoft.Media.AudioTrack", value = AudioTrack.class), + @JsonSubTypes.Type(name = "#Microsoft.Media.VideoTrack", value = VideoTrack.class), + @JsonSubTypes.Type(name = "#Microsoft.Media.TextTrack", value = TextTrack.class) +}) +@Immutable +public class TrackBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TrackBase.class); + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TrackDescriptor.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TrackDescriptor.java index cc25cc4288bde..d5ffa559b8acc 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/Tracks.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Tracks.java new file mode 100644 index 0000000000000..659be2ef3f78e --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Tracks.java @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of Tracks. */ +public interface Tracks { + /** + * Lists the Tracks in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of AssetTrack items as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String accountName, String assetName); + + /** + * Lists the Tracks in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of AssetTrack items as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String accountName, String assetName, Context context); + + /** + * Get the details of a Track in the Asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of a Track in the Asset. + */ + AssetTrack get(String resourceGroupName, String accountName, String assetName, String trackName); + + /** + * Get the details of a Track in the Asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of a Track in the Asset along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String accountName, String assetName, String trackName, Context context); + + /** + * Deletes a Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String assetName, String trackName); + + /** + * Deletes a Track in the asset. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String assetName, String trackName, Context context); + + /** + * Update the track data. Call this API after any changes are made to the track data stored in the asset container. + * For example, you have modified the WebVTT captions file in the Azure blob storage container for the asset, + * viewers will not see the new version of the captions unless this API is called. Note, the changes may not be + * reflected immediately. CDN cache may also need to be purged if applicable. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void updateTrackData(String resourceGroupName, String accountName, String assetName, String trackName); + + /** + * Update the track data. Call this API after any changes are made to the track data stored in the asset container. + * For example, you have modified the WebVTT captions file in the Azure blob storage container for the asset, + * viewers will not see the new version of the captions unless this API is called. Note, the changes may not be + * reflected immediately. CDN cache may also need to be purged if applicable. + * + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param trackName The Asset Track name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void updateTrackData( + String resourceGroupName, String accountName, String assetName, String trackName, Context context); + + /** + * Get the details of a Track in the Asset. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of a Track in the Asset along with {@link Response}. + */ + AssetTrack getById(String id); + + /** + * Get the details of a Track in the Asset. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of a Track in the Asset along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a Track in the asset. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes a Track in the asset. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new AssetTrack resource. + * + * @param name resource name. + * @return the first stage of the new AssetTrack definition. + */ + AssetTrack.DefinitionStages.Blank define(String name); +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksCreateOrUpdateHeaders.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksCreateOrUpdateHeaders.java new file mode 100644 index 0000000000000..121df2dfe8895 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksCreateOrUpdateHeaders.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The TracksCreateOrUpdateHeaders model. */ +@Fluent +public final class TracksCreateOrUpdateHeaders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TracksCreateOrUpdateHeaders.class); + + /* + * The Retry-After property. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /* + * The Azure-AsyncOperation property. + */ + @JsonProperty(value = "Azure-AsyncOperation") + private String azureAsyncOperation; + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer retryAfter() { + return this.retryAfter; + } + + /** + * Set the retryAfter property: The Retry-After property. + * + * @param retryAfter the retryAfter value to set. + * @return the TracksCreateOrUpdateHeaders object itself. + */ + public TracksCreateOrUpdateHeaders withRetryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * Get the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @return the azureAsyncOperation value. + */ + public String azureAsyncOperation() { + return this.azureAsyncOperation; + } + + /** + * Set the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @param azureAsyncOperation the azureAsyncOperation value to set. + * @return the TracksCreateOrUpdateHeaders object itself. + */ + public TracksCreateOrUpdateHeaders withAzureAsyncOperation(String azureAsyncOperation) { + this.azureAsyncOperation = azureAsyncOperation; + return this; + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the TracksCreateOrUpdateHeaders object itself. + */ + public TracksCreateOrUpdateHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksCreateOrUpdateResponse.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksCreateOrUpdateResponse.java new file mode 100644 index 0000000000000..04a0255e63019 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksCreateOrUpdateResponse.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import com.azure.resourcemanager.mediaservices.fluent.models.AssetTrackInner; + +/** Contains all response data for the createOrUpdate operation. */ +public final class TracksCreateOrUpdateResponse extends ResponseBase { + /** + * Creates an instance of TracksCreateOrUpdateResponse. + * + * @param request the request which resulted in this TracksCreateOrUpdateResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public TracksCreateOrUpdateResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + AssetTrackInner value, + TracksCreateOrUpdateHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public AssetTrackInner getValue() { + return super.getValue(); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksDeleteHeaders.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksDeleteHeaders.java new file mode 100644 index 0000000000000..7d1e696172645 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksDeleteHeaders.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The TracksDeleteHeaders model. */ +@Fluent +public final class TracksDeleteHeaders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TracksDeleteHeaders.class); + + /* + * The Retry-After property. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /* + * The Azure-AsyncOperation property. + */ + @JsonProperty(value = "Azure-AsyncOperation") + private String azureAsyncOperation; + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer retryAfter() { + return this.retryAfter; + } + + /** + * Set the retryAfter property: The Retry-After property. + * + * @param retryAfter the retryAfter value to set. + * @return the TracksDeleteHeaders object itself. + */ + public TracksDeleteHeaders withRetryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * Get the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @return the azureAsyncOperation value. + */ + public String azureAsyncOperation() { + return this.azureAsyncOperation; + } + + /** + * Set the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @param azureAsyncOperation the azureAsyncOperation value to set. + * @return the TracksDeleteHeaders object itself. + */ + public TracksDeleteHeaders withAzureAsyncOperation(String azureAsyncOperation) { + this.azureAsyncOperation = azureAsyncOperation; + return this; + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the TracksDeleteHeaders object itself. + */ + public TracksDeleteHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksDeleteResponse.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksDeleteResponse.java new file mode 100644 index 0000000000000..c00dbcde3ba08 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksDeleteResponse.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the delete operation. */ +public final class TracksDeleteResponse extends ResponseBase { + /** + * Creates an instance of TracksDeleteResponse. + * + * @param request the request which resulted in this TracksDeleteResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public TracksDeleteResponse( + HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, TracksDeleteHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksUpdateHeaders.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksUpdateHeaders.java new file mode 100644 index 0000000000000..4a9c9802a9cf7 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksUpdateHeaders.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The TracksUpdateHeaders model. */ +@Fluent +public final class TracksUpdateHeaders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TracksUpdateHeaders.class); + + /* + * The Retry-After property. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /* + * The Azure-AsyncOperation property. + */ + @JsonProperty(value = "Azure-AsyncOperation") + private String azureAsyncOperation; + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer retryAfter() { + return this.retryAfter; + } + + /** + * Set the retryAfter property: The Retry-After property. + * + * @param retryAfter the retryAfter value to set. + * @return the TracksUpdateHeaders object itself. + */ + public TracksUpdateHeaders withRetryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * Get the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @return the azureAsyncOperation value. + */ + public String azureAsyncOperation() { + return this.azureAsyncOperation; + } + + /** + * Set the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @param azureAsyncOperation the azureAsyncOperation value to set. + * @return the TracksUpdateHeaders object itself. + */ + public TracksUpdateHeaders withAzureAsyncOperation(String azureAsyncOperation) { + this.azureAsyncOperation = azureAsyncOperation; + return this; + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the TracksUpdateHeaders object itself. + */ + public TracksUpdateHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksUpdateResponse.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksUpdateResponse.java new file mode 100644 index 0000000000000..94e1835804479 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksUpdateResponse.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import com.azure.resourcemanager.mediaservices.fluent.models.AssetTrackInner; + +/** Contains all response data for the update operation. */ +public final class TracksUpdateResponse extends ResponseBase { + /** + * Creates an instance of TracksUpdateResponse. + * + * @param request the request which resulted in this TracksUpdateResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public TracksUpdateResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + AssetTrackInner value, + TracksUpdateHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public AssetTrackInner getValue() { + return super.getValue(); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksUpdateTrackDataHeaders.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksUpdateTrackDataHeaders.java new file mode 100644 index 0000000000000..323c95f6dfa0a --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksUpdateTrackDataHeaders.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The TracksUpdateTrackDataHeaders model. */ +@Fluent +public final class TracksUpdateTrackDataHeaders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TracksUpdateTrackDataHeaders.class); + + /* + * The Retry-After property. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /* + * The Azure-AsyncOperation property. + */ + @JsonProperty(value = "Azure-AsyncOperation") + private String azureAsyncOperation; + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer retryAfter() { + return this.retryAfter; + } + + /** + * Set the retryAfter property: The Retry-After property. + * + * @param retryAfter the retryAfter value to set. + * @return the TracksUpdateTrackDataHeaders object itself. + */ + public TracksUpdateTrackDataHeaders withRetryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * Get the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @return the azureAsyncOperation value. + */ + public String azureAsyncOperation() { + return this.azureAsyncOperation; + } + + /** + * Set the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @param azureAsyncOperation the azureAsyncOperation value to set. + * @return the TracksUpdateTrackDataHeaders object itself. + */ + public TracksUpdateTrackDataHeaders withAzureAsyncOperation(String azureAsyncOperation) { + this.azureAsyncOperation = azureAsyncOperation; + return this; + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the TracksUpdateTrackDataHeaders object itself. + */ + public TracksUpdateTrackDataHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksUpdateTrackDataResponse.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksUpdateTrackDataResponse.java new file mode 100644 index 0000000000000..df1c9359d5bd8 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TracksUpdateTrackDataResponse.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the updateTrackData operation. */ +public final class TracksUpdateTrackDataResponse extends ResponseBase { + /** + * Creates an instance of TracksUpdateTrackDataResponse. + * + * @param request the request which resulted in this TracksUpdateTrackDataResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public TracksUpdateTrackDataResponse( + HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, TracksUpdateTrackDataHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Transforms.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Transforms.java index 9cb07ef544f69..67696e75f9c88 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Transforms.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Transforms.java @@ -18,7 +18,7 @@ public interface Transforms { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of Transform items. + * @return a collection of Transform items as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String accountName); @@ -33,7 +33,7 @@ public interface Transforms { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of Transform items. + * @return a collection of Transform items as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, String accountName, String filter, String orderby, Context context); @@ -61,7 +61,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Transform. + * @return a Transform along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String accountName, String transformName, Context context); @@ -88,7 +88,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse( String resourceGroupName, String accountName, String transformName, Context context); @@ -100,7 +100,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Transform. + * @return a Transform along with {@link Response}. */ Transform getById(String id); @@ -112,7 +112,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Transform. + * @return a Transform along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); @@ -134,7 +134,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); 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 994ea06e91e03..f176f26c435d5 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 adb7ac0573c29..3e76958ba00e8 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 d782e13d5f17e..11a0d3b3f54c8 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 f86b54e1f7df2..a67e6d790676a 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 82c662fe3c1a5..856e6a01a7023 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,23 +5,11 @@ package com.azure.resourcemanager.mediaservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; /** Describes the settings to be used when encoding the input video into a desired output bitrate layer. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", - defaultImpl = VideoLayer.class) -@JsonTypeName("#Microsoft.Media.VideoLayer") -@JsonSubTypes({@JsonSubTypes.Type(name = "#Microsoft.Media.H264Layer", value = H264Layer.class)}) -@JsonFlatten @Fluent public class VideoLayer extends Layer { @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoLayer.class); 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 359dbddbf92ec..97ea76c15d625 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/VideoTrack.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoTrack.java new file mode 100644 index 0000000000000..38bec6e04fb4a --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoTrack.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Represents a video track in the asset. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type") +@JsonTypeName("#Microsoft.Media.VideoTrack") +@Immutable +public final class VideoTrack extends TrackBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoTrack.class); + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoTrackDescriptor.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoTrackDescriptor.java index 7703b9f462dd5..a051c0f55e09f 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/main/java/com/azure/resourcemanager/mediaservices/models/Visibility.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Visibility.java new file mode 100644 index 0000000000000..d9e72368c76f2 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Visibility.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for Visibility. */ +public final class Visibility extends ExpandableStringEnum { + /** Static value Hidden for Visibility. */ + public static final Visibility HIDDEN = fromString("Hidden"); + + /** Static value Visible for Visibility. */ + public static final Visibility VISIBLE = fromString("Visible"); + + /** + * Creates or finds a Visibility from its string representation. + * + * @param name a name to look for. + * @return the corresponding Visibility. + */ + @JsonCreator + public static Visibility fromString(String name) { + return fromString(name, Visibility.class); + } + + /** @return known Visibility values. */ + public static Collection values() { + return values(Visibility.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 c7feaa5d7ea56..0000000000000 --- 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 2d17b703e3992..0000000000000 --- 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 07a1ac00b1398..0000000000000 --- 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 69fa0af2748ec..0000000000000 --- 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 8289b48f53343..0000000000000 --- 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 c1f8ec30b3d86..0000000000000 --- 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 59a430834328d..0000000000000 --- 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 2cf0ac923c424..0000000000000 --- 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 70254f8771d36..0000000000000 --- 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 7f789bb3c7e4d..0000000000000 --- 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 1aca69ca63eda..0000000000000 --- 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 69f95a2ba2e96..0000000000000 --- 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 aa35034f28670..0000000000000 --- 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 cc0d92d3e16bc..0000000000000 --- 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 32ebfe586d23e..0000000000000 --- 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 0864e5d5689be..0000000000000 --- 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 5098119d366c3..0000000000000 --- 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 c0984344b5da7..0000000000000 --- 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 38551e97d5803..0000000000000 --- 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 5c75f37fa5071..0000000000000 --- 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 44f767dadd7c4..0000000000000 --- 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 de741f5e65709..0000000000000 --- 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 f638765f10a61..0000000000000 --- 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 d3530fe051759..0000000000000 --- 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 000a8cbdcbcad..0000000000000 --- 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 a86d22a0b68ac..0000000000000 --- 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 5fe059ca3c0d0..0000000000000 --- 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 6fa2cd64e5bae..0000000000000 --- 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 b0e746fb89ea5..0000000000000 --- 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 012015f4e0aee..0000000000000 --- 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 4aa9600ae13ef..1a933b7206571 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-11-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 0b7e9910bfbbe..b89065da83a75 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-11-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 0000000000000..006bc72f25dfb --- /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-11-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 0000000000000..1034c7ce239ad --- /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-11-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 f93327c5453a7..fd5ce9145e81e 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-11-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 ec9d51c61e517..3548287477e0d 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-11-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 acdd823fafdee..9407736fbb207 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-11-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 1568d2d091994..802bae428ea66 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-11-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 0000000000000..11f35d861fad2 --- /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-11-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 8aceacbfd10a5..9aee85ecf6f71 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-11-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 b51506e7bc7dd..191d2c2cd708a 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-11-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 0000000000000..6d5841bededcd --- /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-11-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 ba04bb65065a3..3cafabcb232ef 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-11-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 0000000000000..ff19b18c0603c --- /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-11-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 fe74ce1759203..d22f46683533d 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-11-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 0000000000000..e1d3bfd5cf751 --- /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-11-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-11-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-11-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 2196009fa34b4..867c8579bf736 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-11-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 3228c7223a760..4f2aff3ac5e71 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-11-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 0000000000000..898ac3d8e3f52 --- /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-11-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-11-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-11-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-11-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 d9e7ac568084d..7c7add847d430 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-11-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 89cc01d8a2d52..b4456877a4a3a 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-11-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 68e28df88807f..3091fe4c411c4 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-11-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 0363f9b95e5ba..44cfee2708c80 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-11-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-11-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-11-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 6e2675cbb6db7..a79ea2633d50e 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-11-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 682a713082a84..2442b630b4367 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-11-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 61% 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 7cdab48656bf0..60ba98800c0ca 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.JobInputAsset; +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-11-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())) + .withInput(new JobInputAsset().withAssetName("job1-InputAsset")) + .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 5a7d26c33c4cc..82a120eed6cc7 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-11-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 0000000000000..6a8d9ba61ac4e --- /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-11-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 61% 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 b71a8de5dc211..8f5eff2eddf89 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-11-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-11-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-11-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,64 +71,74 @@ public static void listsJobsForTheTransformFilterByName( Context.NONE); } + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-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", "contosomedia", "exampleTransform", - "properties/lastmodified ge 2021-06-01T00:00:10.0000000Z and properties/lastmodified le" - + " 2021-06-01T00:00:20.0000000Z", + "properties/lastmodified ge 2021-11-01T00:00:10.0000000Z and properties/lastmodified le" + + " 2021-11-01T00:00:20.0000000Z", "properties/lastmodified desc", Context.NONE); } + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-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", "contosomedia", "exampleTransform", - "properties/created ge 2021-06-01T00:00:10.0000000Z and properties/created le" - + " 2021-06-01T00:00:20.0000000Z", + "properties/created ge 2021-11-01T00:00:10.0000000Z and properties/created le" + + " 2021-11-01T00:00:20.0000000Z", "properties/created", Context.NONE); } + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-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-11-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 58% 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 cf8e4b9eaed1a..65a684a1239fe 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,33 +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; 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.JobInputAsset; +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-11-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(); resource .update() .withDescription("Example job to illustrate update.") - .withInput(new JobInput()) - .withOutputs(Arrays.asList(new JobOutput())) + .withInput(new JobInputAsset().withAssetName("job1-InputAsset")) + .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 0000000000000..9b64ec1d60134 --- /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-11-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 e40e42e04791f..acf3519df1944 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-11-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 0000000000000..74cb1d4af7f76 --- /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-11-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 0000000000000..0d577e0436652 --- /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-11-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 0000000000000..4437311250946 --- /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-11-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 0000000000000..69792a168b735 --- /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-11-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 0000000000000..d123ec3367fb5 --- /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-11-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 96aebe873fdd1..e61324b8fa2db 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-11-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 e6af356919fc6..3e2a9ccf42c89 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-11-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 861e39a0ff02b..851fbadab8926 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-11-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 0000000000000..e46050ddf2dfe --- /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-11-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 5fb042db8e6f0..e3175297ae2f0 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-11-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 0000000000000..34ad92a3ce1dd --- /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-11-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 b0a5ab76a9a07..8473c05b4f9e1 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-11-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/generated/MediaServiceOperationResultsGetSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaServiceOperationResultsGetSamples.java new file mode 100644 index 0000000000000..ad23c6f4a7c1d --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaServiceOperationResultsGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.generated; + +import com.azure.core.util.Context; + +/** Samples for MediaServiceOperationResults Get. */ +public final class MediaServiceOperationResultsGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/media-service-operation-result-by-id.json + */ + /** + * Sample code: Get status of asynchronous operation. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getStatusOfAsynchronousOperation( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .mediaServiceOperationResults() + .getWithResponse("westus", "6FBA62C4-99B5-4FF8-9826-FC4744A8864F", Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaServiceOperationStatusesGetSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaServiceOperationStatusesGetSamples.java new file mode 100644 index 0000000000000..c1c3ba9f5c94d --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaServiceOperationStatusesGetSamples.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.generated; + +import com.azure.core.util.Context; + +/** Samples for MediaServiceOperationStatuses Get. */ +public final class MediaServiceOperationStatusesGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/media-service-operation-status-by-id-non-terminal-state-failed.json + */ + /** + * Sample code: Get status of asynchronous operation when it is completed with error. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getStatusOfAsynchronousOperationWhenItIsCompletedWithError( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .mediaServiceOperationStatuses() + .getWithResponse("westus", "D612C429-2526-49D5-961B-885AE11406FD", Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/media-service-operation-status-by-id-terminal-state.json + */ + /** + * Sample code: Get status of asynchronous operation when it is completed. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getStatusOfAsynchronousOperationWhenItIsCompleted( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .mediaServiceOperationStatuses() + .getWithResponse("westus", "D612C429-2526-49D5-961B-885AE11406FD", Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/media-service-operation-status-by-id-non-terminal-state.json + */ + /** + * Sample code: Get status of asynchronous operation when it is ongoing. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getStatusOfAsynchronousOperationWhenItIsOngoing( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .mediaServiceOperationStatuses() + .getWithResponse("westus", "D612C429-2526-49D5-961B-885AE11406FD", Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/MediaservicesCreateOrUpdateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesCreateOrUpdateSamples.java similarity index 73% 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 3aaec6b5d995d..7cd585d7b98f3 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,12 +2,15 @@ // 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.AccessControl; import com.azure.resourcemanager.mediaservices.models.AccountEncryption; import com.azure.resourcemanager.mediaservices.models.AccountEncryptionKeyType; -import com.azure.resourcemanager.mediaservices.models.KeyVaultProperties; +import com.azure.resourcemanager.mediaservices.models.DefaultAction; +import com.azure.resourcemanager.mediaservices.models.KeyDelivery; import com.azure.resourcemanager.mediaservices.models.MediaServiceIdentity; +import com.azure.resourcemanager.mediaservices.models.PublicNetworkAccess; import com.azure.resourcemanager.mediaservices.models.ResourceIdentity; import com.azure.resourcemanager.mediaservices.models.StorageAccount; import com.azure.resourcemanager.mediaservices.models.StorageAccountType; @@ -19,14 +22,17 @@ /** Samples for Mediaservices CreateOrUpdate. */ public final class MediaservicesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/async-accounts-create.json + */ /** * Sample code: Create a Media Services account. * - * @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") @@ -37,9 +43,9 @@ public static void createAMediaServicesAccount( .withType("UserAssigned") .withUserAssignedIdentities( mapOf( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1", new UserAssignedManagedIdentity(), - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2", new UserAssignedManagedIdentity()))) .withStorageAccounts( Arrays @@ -51,19 +57,20 @@ public static void createAMediaServicesAccount( .withIdentity( new ResourceIdentity() .withUserAssignedIdentity( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1") + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1") .withUseSystemAssignedIdentity(false)))) .withStorageAuthentication(StorageAuthentication.MANAGED_IDENTITY) .withEncryption( new AccountEncryption() .withType(AccountEncryptionKeyType.CUSTOMER_KEY) - .withKeyVaultProperties( - new KeyVaultProperties().withKeyIdentifier("https://keyvault.vault.azure.net/keys/key1")) .withIdentity( new ResourceIdentity() .withUserAssignedIdentity( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1") + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1") .withUseSystemAssignedIdentity(false))) + .withKeyDelivery( + new KeyDelivery().withAccessControl(new AccessControl().withDefaultAction(DefaultAction.ALLOW))) + .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) .create(); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/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 d69a514ac2642..73f23a1324602 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-11-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 0fbdc4897f3f2..d3cbf1856fe59 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-11-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 f3f11a53714b6..244716ad29b31 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-11-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 de541b07bd0a8..dd05a8ef15051 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-11-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 ba538d8a549d6..2421aa94e80bd 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-11-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 a21096af10ec9..aacf72fff6726 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-11-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 71% 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 fb5787c7f7470..153287dc21380 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-11-01/examples/async-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/OperationResultsGetSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/OperationResultsGetSamples.java new file mode 100644 index 0000000000000..d464c5780ebc2 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/OperationResultsGetSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.generated; + +import com.azure.core.util.Context; + +/** Samples for OperationResults Get. */ +public final class OperationResultsGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/asset-tracks-operation-result-by-id.json + */ + /** + * Sample code: Get result of asynchronous operation. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getResultOfAsynchronousOperation( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .operationResults() + .getWithResponse( + "contoso", + "contosomedia", + "ClimbingMountRainer", + "text1", + "e78f8d40-7aaa-4f2f-8ae6-73987e7c5a08", + Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/OperationStatusesGetSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/OperationStatusesGetSamples.java new file mode 100644 index 0000000000000..f7bafa5711dac --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/OperationStatusesGetSamples.java @@ -0,0 +1,73 @@ +// 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 OperationStatuses Get. */ +public final class OperationStatusesGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/asset-tracks-operation-status-by-id-terminal-state-failed.json + */ + /** + * Sample code: Get status of asynchronous operation when it is completed with error. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getStatusOfAsynchronousOperationWhenItIsCompletedWithError( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .operationStatuses() + .getWithResponse( + "contoso", + "contosomedia", + "ClimbingMountRainer", + "text1", + "86835197-3b47-402e-b313-70b82eaba296", + Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/asset-tracks-operation-status-by-id-terminal-state.json + */ + /** + * Sample code: Get status of asynchronous operation when it is completed. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getStatusOfAsynchronousOperationWhenItIsCompleted( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .operationStatuses() + .getWithResponse( + "contoso", + "contosomedia", + "ClimbingMountRainer", + "text1", + "e78f8d40-7aaa-4f2f-8ae6-73987e7c5a08", + Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/asset-tracks-operation-status-by-id-non-terminal-state.json + */ + /** + * Sample code: Get status of asynchronous operation when it is ongoing. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getStatusOfAsynchronousOperationWhenItIsOngoing( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .operationStatuses() + .getWithResponse( + "contoso", + "contosomedia", + "ClimbingMountRainer", + "text1", + "5827d9a1-1fb4-4e54-ac40-8eeed9b862c8", + Context.NONE); + } +} 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 0000000000000..494d9dc54cfa0 --- /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-11-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 a24cf44ca3a26..12dd1a95bab5b 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-11-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 ea7b408447540..fbc88b9c87621 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-11-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 bcbe29123559b..4470efcdf10e6 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-11-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 c02db9ed6ddda..3209b083b21e5 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-11-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 0000000000000..14e46a07a0f43 --- /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-11-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 0000000000000..b1a9798f6d4b3 --- /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-11-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 386327a2ccf15..512f7615ebcf2 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-11-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 0000000000000..b1eacd49510a3 --- /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-11-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 4ec3fd8295c2a..e9e0f1fd5d3ac 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-11-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 0000000000000..c1a4e0a484c5d --- /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-11-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 9bfd490998c4c..d87dc471024a7 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-11-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/StreamingEndpointsSkusSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsSkusSamples.java new file mode 100644 index 0000000000000..8493c1470b264 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/StreamingEndpointsSkusSamples.java @@ -0,0 +1,24 @@ +// 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 Skus. */ +public final class StreamingEndpointsSkusSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/streamingendpoint-list-skus.json + */ + /** + * Sample code: List a streaming endpoint sku. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listAStreamingEndpointSku(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .streamingEndpoints() + .skusWithResponse("mediaresources", "slitestmedia10", "myStreamingEndpoint1", Context.NONE); + } +} 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 0000000000000..3bd3a6d6c17e4 --- /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-11-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 0000000000000..1e0147f71b1e4 --- /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-11-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 9bf6adba36567..ab6ca02cedd7c 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-11-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 c4780e50e3678..9e9ccdcedaa81 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-11-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-11-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-11-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 a436cd390c1df..703cc1c89b944 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-11-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 974c7fcc8a54d..2d7a434e6fa02 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-11-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 24c2cc6ad968f..cccd46bb58d8b 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-11-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 8b311453792d3..382bccaa72ba4 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-11-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-11-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 0000000000000..b2c5790aa98bb --- /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-11-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 001975282e342..02f1417b2f9b8 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-11-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-11-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-11-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-11-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-11-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 124eb52a4bd18..28061216ef078 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-11-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 0000000000000..117a425c2e41c --- /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-11-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 0000000000000..a749f422fc586 --- /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-11-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/TracksCreateOrUpdateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TracksCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..0f5259ad885a3 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TracksCreateOrUpdateSamples.java @@ -0,0 +1,32 @@ +// 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.TextTrack; +import com.azure.resourcemanager.mediaservices.models.Visibility; + +/** Samples for Tracks CreateOrUpdate. */ +public final class TracksCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/asset-tracks-create.json + */ + /** + * Sample code: Creates a Track. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void createsATrack(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .tracks() + .define("text3") + .withExistingAsset("contoso", "contosomedia", "ClimbingMountRainer") + .withTrack( + new TextTrack() + .withFileName("text3.ttml") + .withDisplayName("A new track") + .withPlayerVisibility(Visibility.VISIBLE)) + .create(); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TracksDeleteSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TracksDeleteSamples.java new file mode 100644 index 0000000000000..68be207a9ee97 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TracksDeleteSamples.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 Tracks Delete. */ +public final class TracksDeleteSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/asset-tracks-delete.json + */ + /** + * Sample code: Delete a Track. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void deleteATrack(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.tracks().delete("contoso", "contosomedia", "ClimbingMountRainer", "text2", Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TracksGetSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TracksGetSamples.java new file mode 100644 index 0000000000000..1f7411cc11597 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TracksGetSamples.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 Tracks Get. */ +public final class TracksGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/asset-tracks-get-by-name.json + */ + /** + * Sample code: Get a Track by name. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getATrackByName(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.tracks().getWithResponse("contoso", "contosomedia", "ClimbingMountRainer", "text1", Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TracksListSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TracksListSamples.java new file mode 100644 index 0000000000000..27964ee2edf65 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TracksListSamples.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 Tracks List. */ +public final class TracksListSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/asset-tracks-list-all.json + */ + /** + * Sample code: Lists all Tracks. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void listsAllTracks(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.tracks().list("contoso", "contosomedia", "ClimbingMountRainer", Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TracksUpdateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TracksUpdateSamples.java new file mode 100644 index 0000000000000..aea8e33ab9ca3 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TracksUpdateSamples.java @@ -0,0 +1,29 @@ +// 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.AssetTrack; +import com.azure.resourcemanager.mediaservices.models.TextTrack; + +/** Samples for Tracks Update. */ +public final class TracksUpdateSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/asset-tracks-update.json + */ + /** + * Sample code: Update a Track. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void updateATrack(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + AssetTrack resource = + manager + .tracks() + .getWithResponse("contoso", "contosomedia", "ClimbingMountRainer", "text1", Context.NONE) + .getValue(); + resource.update().withTrack(new TextTrack().withDisplayName("A new name")).apply(); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TracksUpdateTrackDataSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TracksUpdateTrackDataSamples.java new file mode 100644 index 0000000000000..9a337bae1be77 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/TracksUpdateTrackDataSamples.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 Tracks UpdateTrackData. */ +public final class TracksUpdateTrackDataSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/asset-tracks-update-data.json + */ + /** + * Sample code: Update the data for a tracks. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void updateTheDataForATracks(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager.tracks().updateTrackData("contoso", "contosomedia", "ClimbingMountRainer", "text2", 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 0000000000000..dfd44d1be9bb4 --- /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-11-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 0000000000000..9f36e06696777 --- /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-11-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 0000000000000..7ff34508bdbe7 --- /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-11-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 52% 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 fdf318b783f40..8d06eab476ccb 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,38 +2,44 @@ // 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-11-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", "contosomedia", - "properties/created gt 2021-06-01T00:00:00.0000000Z and properties/created le" - + " 2021-06-01T00:00:10.0000000Z", + "properties/created gt 2021-11-01T00:00:00.0000000Z and properties/created le" + + " 2021-11-01T00:00:10.0000000Z", "properties/created", Context.NONE); } + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-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,31 +49,36 @@ public static void listsTheTransformsFilterByName( Context.NONE); } + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-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", "contosomedia", - "properties/lastmodified gt 2021-06-01T00:00:00.0000000Z and properties/lastmodified le" - + " 2021-06-01T00:00:10.0000000Z", + "properties/lastmodified gt 2021-11-01T00:00:00.0000000Z and properties/lastmodified le" + + " 2021-11-01T00:00:10.0000000Z", "properties/lastmodified desc", Context.NONE); } + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-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 0000000000000..d03a2b0a93abd --- /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-11-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(); + } +}